home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Tape Archive
(archive/tar).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Tape Archive (archive/tar)
| magic
| Supported |
100%
| file
| tar archive
| default
| |
99%
| file
| tar archive (V7), file go4gw/, mode 775 , uid 2173 , gid 0 , size 0 , seconds 5301777227
| default
| |
98%
| file
| data
| default
| |
100%
| TrID
| Sybase iAnywhere database files
| default (weak)
| |
100%
| lsar
| Tar
| default
| |
100%
| gt2
| TAR Archiv gefunden (Auflistung ist deaktiviert)
| default
| |
100%
| disktype
| Pre-POSIX tar archive
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 67 6f 34 67 77 2f 00 00 | 00 00 00 00 00 00 00 00 |go4gw/..|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 20 20 37 | 37 35 20 00 20 20 32 31 |.... 7|75 . 21|
|00000070| 37 33 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |73 . | 0 . |
|00000080| 20 20 20 20 20 20 30 20 | 20 35 33 30 31 37 37 37 | 0 | 5301777|
|00000090| 32 32 37 20 20 20 35 30 | 36 30 00 20 00 00 00 00 |227 50|60. ....|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 67 6f 34 67 77 2f 52 45 | 41 44 4d 45 00 00 00 00 |go4gw/RE|ADME....|
|00000210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 20 20 20 37 | 37 35 20 00 20 20 32 31 |.... 7|75 . 21|
|00000270| 37 33 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |73 . | 0 . |
|00000280| 20 20 31 31 31 34 31 20 | 20 35 33 30 31 37 37 37 | 11141 | 5301777|
|00000290| 32 35 32 20 20 20 36 30 | 34 34 00 20 00 00 00 00 |252 60|44. ....|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 67 6f 34 67 77 20 76 65 | 72 73 69 6f 6e 20 31 2e |go4gw ve|rsion 1.|
|00000410| 30 31 0a 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |01.-----|--------|
|00000420| 2d 2d 2d 2d 2d 0a 0a 67 | 6f 34 67 77 20 69 73 20 |-----..g|o4gw is |
|00000430| 61 20 64 61 65 6d 6f 6e | 20 77 68 69 63 68 20 63 |a daemon| which c|
|00000440| 61 6e 20 68 61 6e 64 6c | 65 20 6d 61 6e 79 20 64 |an handl|e many d|
|00000450| 69 66 66 65 72 65 6e 74 | 20 67 6f 70 68 65 72 20 |ifferent| gopher |
|00000460| 67 61 74 65 77 61 79 73 | 0a 77 72 69 74 74 65 6e |gateways|.written|
|00000470| 20 69 6e 20 70 65 72 6c | 2e 20 49 74 20 73 68 6f | in perl|. It sho|
|00000480| 75 6c 64 20 62 65 20 73 | 74 61 72 74 65 64 20 66 |uld be s|tarted f|
|00000490| 72 6f 6d 20 69 6e 65 74 | 64 2e 0a 0a 42 75 67 73 |rom inet|d...Bugs|
|000004a0| 20 74 6f 20 67 6f 70 68 | 65 72 40 62 6f 6f 6d 62 | to goph|er@boomb|
|000004b0| 6f 78 2e 6d 69 63 72 6f | 2e 75 6d 6e 2e 65 64 75 |ox.micro|.umn.edu|
|000004c0| 0a 0a 49 4e 53 54 41 4c | 4c 41 54 49 4f 4e 0a 2d |..INSTAL|LATION.-|
|000004d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 0a 0a 59 6f 75 |--------|---..You|
|000004e0| 20 6e 65 65 64 20 74 6f | 20 70 75 74 20 74 68 65 | need to| put the|
|000004f0| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 6c 69 6e 65 20 | followi|ng line |
|00000500| 69 6e 20 2f 65 74 63 2f | 73 65 72 76 69 63 65 73 |in /etc/|services|
|00000510| 3a 0a 0a 67 6f 34 67 77 | 20 20 20 20 20 09 34 33 |:..go4gw| .43|
|00000520| 32 30 2f 74 63 70 0a 0a | 41 6e 64 20 74 68 65 20 |20/tcp..|And the |
|00000530| 66 6f 6c 6c 6f 77 69 6e | 67 20 6c 69 6e 65 20 69 |followin|g line i|
|00000540| 6e 20 2f 65 74 63 2f 69 | 6e 65 74 64 2e 63 6f 6e |n /etc/i|netd.con|
|00000550| 66 20 28 64 65 70 65 6e | 64 69 6e 67 20 6f 6e 20 |f (depen|ding on |
|00000560| 79 6f 75 72 20 73 79 73 | 74 65 6d 20 74 79 70 65 |your sys|tem type|
|00000570| 29 3a 0a 0a 67 6f 34 67 | 77 20 20 73 74 72 65 61 |):..go4g|w strea|
|00000580| 6d 20 20 74 63 70 20 20 | 20 20 20 6e 6f 77 61 69 |m tcp | nowai|
|00000590| 74 20 20 2f 75 73 72 2f | 6c 6f 63 61 6c 2f 65 74 |t /usr/|local/et|
|000005a0| 63 2f 67 6f 34 67 77 20 | 20 67 6f 34 67 77 0a 0a |c/go4gw | go4gw..|
|000005b0| 54 68 65 20 67 6f 34 67 | 77 20 73 63 72 69 70 74 |The go4g|w script|
|000005c0| 20 68 61 73 20 61 20 66 | 65 77 20 76 61 72 69 61 | has a f|ew varia|
|000005d0| 62 6c 65 73 20 79 6f 75 | 20 6d 69 67 68 74 20 77 |bles you| might w|
|000005e0| 61 6e 74 20 74 6f 20 63 | 68 61 6e 67 65 3a 0a 0a |ant to c|hange:..|
|000005f0| 24 47 63 6f 6e 66 5f 66 | 69 6c 65 20 3d 20 22 2f |$Gconf_f|ile = "/|
|00000600| 75 73 72 2f 6c 6f 63 61 | 6c 2f 65 74 63 2f 67 6f |usr/loca|l/etc/go|
|00000610| 34 67 77 2e 63 6f 6e 66 | 22 3b 20 23 20 63 6f 6e |4gw.conf|"; # con|
|00000620| 66 69 67 75 72 61 74 69 | 6f 6e 20 66 69 6c 65 0a |figurati|on file.|
|00000630| 24 47 70 6f 72 74 3d 34 | 33 32 30 3b 20 20 20 20 |$Gport=4|320; |
|00000640| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000650| 20 20 20 20 20 20 20 20 | 20 20 20 23 20 70 6f 72 | | # por|
|00000660| 74 20 54 48 49 53 20 64 | 61 65 6d 6f 6e 20 69 73 |t THIS d|aemon is|
|00000670| 20 72 75 6e 6e 69 6e 67 | 20 6f 6e 0a 24 47 68 6f | running| on.$Gho|
|00000680| 73 74 3d 22 53 6c 61 70 | 73 68 6f 74 2e 53 74 61 |st="Slap|shot.Sta|
|00000690| 6e 66 6f 72 64 2e 45 44 | 55 22 3b 20 20 20 20 20 |nford.ED|U"; |
|000006a0| 20 20 20 20 20 20 20 23 | 20 68 6f 73 74 20 54 48 | #| host TH|
|000006b0| 49 53 20 64 61 65 6d 6f | 6e 20 69 73 20 72 75 6e |IS daemo|n is run|
|000006c0| 6e 69 6e 67 20 6f 6e 0a | 0a 59 6f 75 20 6e 65 65 |ning on.|.You nee|
|000006d0| 64 20 74 6f 20 73 65 74 | 20 47 70 6f 72 74 20 74 |d to set| Gport t|
|000006e0| 6f 20 74 68 65 20 73 61 | 6d 65 20 70 6f 72 74 20 |o the sa|me port |
|000006f0| 61 73 20 69 6e 20 2f 65 | 74 63 2f 73 65 72 76 69 |as in /e|tc/servi|
|00000700| 63 65 73 2c 20 61 6e 64 | 20 47 68 6f 73 74 20 74 |ces, and| Ghost t|
|00000710| 6f 0a 79 6f 75 72 20 66 | 75 6c 6c 79 20 71 75 61 |o.your f|ully qua|
|00000720| 6c 69 66 69 65 64 20 68 | 6f 73 74 20 6e 61 6d 65 |lified h|ost name|
|00000730| 2e 0a 0a 57 68 79 20 61 | 72 65 6e 27 74 20 74 68 |...Why a|ren't th|
|00000740| 65 73 65 20 74 77 6f 20 | 61 75 74 6f 2d 6d 61 67 |ese two |auto-mag|
|00000750| 69 63 61 6c 6c 79 20 66 | 69 67 75 72 65 64 20 6f |ically f|igured o|
|00000760| 75 74 3f 0a 4d 61 69 6e | 6c 79 20 66 6f 72 20 73 |ut?.Main|ly for s|
|00000770| 70 65 65 64 2c 20 62 75 | 74 20 61 6c 73 6f 20 62 |peed, bu|t also b|
|00000780| 65 63 61 75 73 65 20 73 | 6f 6d 65 20 60 68 6f 73 |ecause s|ome `hos|
|00000790| 74 6e 61 6d 65 60 20 63 | 6f 6d 6d 61 6e 64 73 20 |tname` c|ommands |
|000007a0| 64 6f 6e 27 74 0a 68 61 | 76 65 20 74 68 65 20 64 |don't.ha|ve the d|
|000007b0| 6f 6d 61 69 6e 2c 20 73 | 6f 6d 65 20 64 6f 2c 20 |omain, s|ome do, |
|000007c0| 65 74 63 2e 20 49 74 73 | 20 65 61 73 69 65 72 20 |etc. Its| easier |
|000007d0| 6a 75 73 74 20 74 6f 20 | 64 65 66 69 6e 65 20 74 |just to |define t|
|000007e0| 68 65 6d 20 68 65 72 65 | 2e 0a 53 69 6e 63 65 20 |hem here|..Since |
|000007f0| 61 6c 6c 20 74 68 65 20 | 6f 74 68 65 72 20 67 61 |all the |other ga|
|00000800| 74 65 77 61 79 73 20 61 | 72 65 20 72 75 6e 20 69 |teways a|re run i|
|00000810| 6e 20 74 68 65 20 63 6f | 6e 74 65 78 74 20 6f 66 |n the co|ntext of|
|00000820| 20 74 68 69 73 20 70 65 | 72 6c 20 73 63 72 69 70 | this pe|rl scrip|
|00000830| 74 2c 0a 74 68 65 20 67 | 61 74 65 77 61 79 73 20 |t,.the g|ateways |
|00000840| 64 6f 6e 27 74 20 6e 65 | 65 64 20 61 6e 79 20 6f |don't ne|ed any o|
|00000850| 66 20 74 68 69 73 20 73 | 74 75 66 66 20 69 6e 20 |f this s|tuff in |
|00000860| 74 68 65 6d 2e 0a 0a 47 | 63 6f 6e 66 5f 66 69 6c |them...G|conf_fil|
|00000870| 65 20 73 68 6f 75 6c 64 | 20 62 65 20 73 65 74 20 |e should| be set |
|00000880| 74 6f 20 74 68 65 20 6c | 6f 63 61 74 69 6f 6e 20 |to the l|ocation |
|00000890| 6f 66 20 79 6f 75 72 20 | 67 6f 34 67 77 2e 63 6f |of your |go4gw.co|
|000008a0| 6e 66 20 66 69 6c 65 2e | 20 54 68 65 0a 66 6f 72 |nf file.| The.for|
|000008b0| 6d 61 74 20 6f 66 20 74 | 68 69 73 20 66 69 6c 65 |mat of t|his file|
|000008c0| 20 69 73 3a 0a 0a 23 0a | 23 20 66 6f 72 6d 61 74 | is:..#.|# format|
|000008d0| 0a 23 20 67 61 74 65 77 | 61 79 20 3a 20 75 73 65 |.# gatew|ay : use|
|000008e0| 72 20 3a 20 6d 6f 64 75 | 6c 65 20 3a 20 67 6f 70 |r : modu|le : gop|
|000008f0| 68 65 72 20 74 69 74 6c | 65 0a 23 0a 77 68 6f 69 |her titl|e.#.whoi|
|00000900| 73 3a 2d 32 3a 2f 75 73 | 72 2f 6c 6f 63 61 6c 2f |s:-2:/us|r/local/|
|00000910| 65 74 63 2f 67 32 77 68 | 6f 69 73 3a 57 68 6f 69 |etc/g2wh|ois:Whoi|
|00000920| 73 3a 0a 6e 6e 74 70 3a | 2d 32 3a 2f 75 73 72 2f |s:.nntp:|-2:/usr/|
|00000930| 6c 6f 63 61 6c 2f 65 74 | 63 2f 67 32 6e 6e 74 70 |local/et|c/g2nntp|
|00000940| 3a 55 53 45 4e 45 54 20 | 4e 65 77 73 3a 0a 77 65 |:USENET |News:.we|
|00000950| 62 73 74 65 72 3a 2d 32 | 3a 2f 75 73 72 2f 6c 6f |bster:-2|:/usr/lo|
|00000960| 63 61 6c 2f 65 74 63 2f | 67 32 77 65 62 73 74 65 |cal/etc/|g2webste|
|00000970| 72 3a 57 65 62 73 74 65 | 72 3a 0a 23 0a 0a 57 68 |r:Webste|r:.#..Wh|
|00000980| 65 72 65 20 67 61 74 65 | 77 61 79 20 69 73 20 74 |ere gate|way is t|
|00000990| 68 65 20 6e 61 6d 65 20 | 6f 66 20 74 68 65 20 67 |he name |of the g|
|000009a0| 61 74 65 77 61 79 2c 20 | 75 73 65 72 20 69 73 20 |ateway, |user is |
|000009b0| 65 69 74 68 65 72 20 61 | 20 6e 75 6d 65 72 69 63 |either a| numeric|
|000009c0| 20 75 69 64 0a 6f 72 20 | 6e 61 6d 65 2c 20 20 6d | uid.or |name, m|
|000009d0| 6f 64 75 6c 65 20 69 73 | 20 74 68 65 20 6e 61 6d |odule is| the nam|
|000009e0| 65 20 6f 66 20 74 68 65 | 20 70 65 72 6c 20 73 63 |e of the| perl sc|
|000009f0| 72 69 70 74 20 74 68 61 | 74 20 67 6f 34 67 77 20 |ript tha|t go4gw |
|00000a00| 77 69 6c 6c 20 64 79 6e | 61 6d 69 63 61 6c 6c 79 |will dyn|amically|
|00000a10| 20 0a 6c 6f 61 64 2c 20 | 61 6e 64 20 74 69 74 6c | .load, |and titl|
|00000a20| 65 20 69 73 20 74 68 65 | 20 74 69 74 6c 65 20 74 |e is the| title t|
|00000a30| 68 61 74 20 77 69 6c 6c | 20 73 68 6f 77 20 75 70 |hat will| show up|
|00000a40| 20 69 6e 20 74 68 65 20 | 67 6f 70 68 65 72 20 6d | in the |gopher m|
|00000a50| 65 6e 75 20 69 66 20 67 | 6f 34 67 77 20 0a 69 73 |enu if g|o4gw .is|
|00000a60| 20 73 65 6e 74 20 74 68 | 65 20 73 74 72 69 6e 67 | sent th|e string|
|00000a70| 20 22 22 2e 20 49 66 20 | 74 68 65 20 67 61 74 65 | "". If |the gate|
|00000a80| 77 61 79 20 64 6f 65 73 | 6e 27 74 20 74 61 6b 65 |way does|n't take|
|00000a90| 20 61 6e 20 65 6d 70 74 | 79 20 73 74 72 69 6e 67 | an empt|y string|
|00000aa0| 2c 20 74 68 65 20 74 69 | 74 6c 65 0a 73 68 6f 75 |, the ti|tle.shou|
|00000ab0| 6c 64 20 62 65 20 22 22 | 20 61 6e 64 20 69 74 20 |ld be ""| and it |
|00000ac0| 77 6f 6e 27 74 20 73 68 | 6f 77 20 75 70 20 69 6e |won't sh|ow up in|
|00000ad0| 20 74 68 65 20 6d 65 6e | 75 2e 20 42 79 20 77 72 | the men|u. By wr|
|00000ae0| 69 74 69 6e 67 20 61 6c | 6c 20 79 6f 75 72 20 67 |iting al|l your g|
|00000af0| 61 74 65 77 61 79 73 20 | 73 6f 0a 74 68 65 79 20 |ateways |so.they |
|00000b00| 74 61 6b 65 20 61 20 22 | 22 20 63 6f 6d 6d 61 6e |take a "|" comman|
|00000b10| 64 2c 20 79 6f 75 20 63 | 61 6e 20 70 6f 69 6e 74 |d, you c|an point|
|00000b20| 20 61 20 6c 69 6e 6b 20 | 61 74 20 74 68 65 20 67 | a link |at the g|
|00000b30| 6f 34 67 77 20 64 61 65 | 6d 6f 6e 20 77 69 74 68 |o4gw dae|mon with|
|00000b40| 0a 70 61 74 68 20 73 65 | 74 20 74 6f 20 22 22 20 |.path se|t to "" |
|00000b50| 61 6e 64 20 67 65 74 20 | 61 20 6d 65 6e 75 20 6f |and get |a menu o|
|00000b60| 66 20 61 6c 6c 20 79 6f | 75 72 20 67 61 74 65 77 |f all yo|ur gatew|
|00000b70| 61 79 73 2e 20 54 68 65 | 20 6d 65 6e 75 20 6f 72 |ays. The| menu or|
|00000b80| 64 65 72 20 77 69 6c 6c | 0a 62 65 20 74 68 65 20 |der will|.be the |
|00000b90| 73 61 6d 65 20 6f 72 64 | 65 72 20 61 73 20 74 68 |same ord|er as th|
|00000ba0| 65 20 67 6f 34 67 77 2e | 63 6f 6e 66 20 66 69 6c |e go4gw.|conf fil|
|00000bb0| 65 2e 0a 0a 4f 6e 63 65 | 20 79 6f 75 27 76 65 20 |e...Once| you've |
|00000bc0| 64 6f 6e 65 20 61 6c 6c | 20 74 68 69 73 20 63 6f |done all| this co|
|00000bd0| 6e 66 69 67 75 72 61 74 | 69 6f 6e 20 79 6f 75 27 |nfigurat|ion you'|
|00000be0| 6c 6c 20 77 61 6e 74 20 | 74 6f 20 74 72 79 20 48 |ll want |to try H|
|00000bf0| 55 50 20 69 6e 65 74 64 | 2e 0a 54 68 65 6e 20 79 |UP inetd|..Then y|
|00000c00| 6f 75 20 63 61 6e 20 74 | 65 73 74 20 69 74 20 6f |ou can t|est it o|
|00000c10| 75 74 20 62 79 20 72 75 | 6e 6e 69 6e 67 20 61 20 |ut by ru|nning a |
|00000c20| 67 6f 70 68 65 72 20 63 | 6c 69 65 6e 74 20 74 6f |gopher c|lient to|
|00000c30| 20 74 68 65 20 6e 65 77 | 6c 79 0a 63 72 65 61 74 | the new|ly.creat|
|00000c40| 65 64 20 70 6f 72 74 2e | 2e 0a 0a 0a 57 72 69 74 |ed port.|....Writ|
|00000c50| 69 6e 67 20 67 6f 34 67 | 77 20 67 61 74 65 77 61 |ing go4g|w gatewa|
|00000c60| 79 73 0a 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |ys.-----|--------|
|00000c70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 0a 67 6f 34 67 77 |--------|--.go4gw|
|00000c80| 20 67 61 74 65 77 61 79 | 73 20 6e 65 65 64 20 74 | gateway|s need t|
|00000c90| 6f 20 61 20 66 6f 6c 6c | 6f 77 20 61 20 66 65 77 |o a foll|ow a few|
|00000ca0| 20 73 69 6d 70 6c 65 20 | 63 6f 6e 76 65 6e 74 69 | simple |conventi|
|00000cb0| 6f 6e 73 3a 0a 0a 59 6f | 75 20 6e 65 65 64 20 74 |ons:..Yo|u need t|
|00000cc0| 6f 20 68 61 76 65 20 61 | 20 72 6f 75 74 69 6e 65 |o have a| routine|
|00000cd0| 20 63 61 6c 6c 65 64 20 | 22 24 7b 67 61 74 65 77 | called |"${gatew|
|00000ce0| 61 79 7d 5f 6d 61 69 6e | 22 2c 20 77 68 65 72 65 |ay}_main|", where|
|00000cf0| 20 67 61 74 65 77 61 79 | 0a 69 73 20 74 68 65 20 | gateway|.is the |
|00000d00| 6e 61 6d 65 20 6f 66 20 | 79 6f 75 72 20 67 61 74 |name of |your gat|
|00000d10| 65 77 61 79 2e 20 46 6f | 72 20 65 78 61 6d 70 6c |eway. Fo|r exampl|
|00000d20| 65 2c 20 69 66 20 79 6f | 75 72 20 67 61 74 65 77 |e, if yo|ur gatew|
|00000d30| 61 79 20 69 73 20 63 61 | 6c 6c 65 64 20 0a 77 68 |ay is ca|lled .wh|
|00000d40| 6f 69 73 2c 20 74 68 65 | 6e 20 79 6f 75 20 6e 65 |ois, the|n you ne|
|00000d50| 65 64 3a 0a 0a 77 68 6f | 69 73 5f 6d 61 69 6e 20 |ed:..who|is_main |
|00000d60| 7b 0a 20 20 6c 6f 63 61 | 6c 28 24 5f 29 20 3d 20 |{. loca|l($_) = |
|00000d70| 40 5f 3b 0a 20 20 2e 2e | 2e 0a 7d 0a 0a 49 6e 20 |@_;. ..|..}..In |
|00000d80| 79 6f 75 72 20 6d 6f 64 | 75 6c 65 20 28 2f 75 73 |your mod|ule (/us|
|00000d90| 72 2f 6c 6f 63 61 6c 2f | 65 74 63 2f 67 32 77 68 |r/local/|etc/g2wh|
|00000da0| 6f 69 73 20 66 6f 72 20 | 65 78 61 6d 70 6c 65 29 |ois for |example)|
|00000db0| 2e 0a 0a 59 6f 75 72 20 | 2a 5f 6d 61 69 6e 20 77 |...Your |*_main w|
|00000dc0| 69 6c 6c 20 62 65 20 70 | 61 73 73 65 64 20 74 68 |ill be p|assed th|
|00000dd0| 65 20 73 74 72 69 6e 67 | 20 73 65 6e 74 20 74 6f |e string| sent to|
|00000de0| 20 67 6f 34 67 77 20 57 | 49 54 48 4f 55 54 20 79 | go4gw W|ITHOUT y|
|00000df0| 6f 75 72 20 67 61 74 65 | 77 61 79 20 0a 70 72 65 |our gate|way .pre|
|00000e00| 66 69 78 2e 20 46 6f 72 | 20 65 78 61 6d 70 6c 65 |fix. For| example|
|00000e10| 2c 20 69 66 20 73 6f 6d | 65 6f 6e 65 20 73 65 6e |, if som|eone sen|
|00000e20| 64 73 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |ds the f|ollowing|
|00000e30| 20 73 74 72 69 6e 67 20 | 74 6f 20 67 6f 34 67 77 | string |to go4gw|
|00000e40| 3a 0a 0a 6e 6e 74 70 20 | 6c 73 20 73 75 2e 6a 6f |:..nntp |ls su.jo|
|00000e50| 62 73 0a 0a 54 68 65 6e | 20 67 6f 34 67 77 20 77 |bs..Then| go4gw w|
|00000e60| 69 6c 6c 20 63 61 6c 6c | 20 26 6e 6e 74 70 5f 6d |ill call| &nntp_m|
|00000e70| 61 69 6e 28 22 6c 73 20 | 73 75 2e 6a 6f 62 73 22 |ain("ls |su.jobs"|
|00000e80| 29 2c 20 20 61 66 74 65 | 72 20 6c 6f 61 64 69 6e |), afte|r loadin|
|00000e90| 67 20 67 32 6e 6e 74 70 | 2e 0a 0a 59 6f 75 20 73 |g g2nntp|...You s|
|00000ea0| 68 6f 75 6c 64 20 64 65 | 66 69 6e 65 20 61 6e 79 |hould de|fine any|
|00000eb0| 20 76 61 72 69 61 62 6c | 65 73 20 74 68 61 74 20 | variabl|es that |
|00000ec0| 75 73 65 72 73 20 6d 69 | 67 68 74 20 68 61 76 65 |users mi|ght have|
|00000ed0| 20 74 6f 20 63 68 61 6e | 67 65 20 61 74 20 74 68 | to chan|ge at th|
|00000ee0| 65 0a 66 72 6f 6e 74 20 | 6f 66 20 79 6f 75 72 20 |e.front |of your |
|00000ef0| 73 63 72 69 70 74 2c 20 | 61 6e 64 20 70 72 65 66 |script, |and pref|
|00000f00| 69 78 20 74 68 65 6d 20 | 77 69 74 68 20 79 6f 75 |ix them |with you|
|00000f10| 72 20 67 61 74 65 77 61 | 79 20 6e 61 6d 65 2e 20 |r gatewa|y name. |
|00000f20| 0a 0a 57 68 65 6e 20 79 | 6f 75 72 20 67 61 74 65 |..When y|our gate|
|00000f30| 77 61 79 20 68 61 73 20 | 74 6f 20 72 65 74 75 72 |way has |to retur|
|00000f40| 6e 20 73 65 6c 65 63 74 | 6f 72 20 73 74 72 69 6e |n select|or strin|
|00000f50| 67 2c 20 68 6f 73 74 6e | 61 6d 65 2c 20 61 6e 64 |g, hostn|ame, and|
|00000f60| 20 70 6f 72 74 2c 20 69 | 74 0a 73 68 6f 75 6c 64 | port, i|t.should|
|00000f70| 20 75 73 65 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 | use the| followi|
|00000f80| 6e 67 20 76 61 72 69 61 | 62 6c 65 73 3a 0a 0a 24 |ng varia|bles:..$|
|00000f90| 47 67 77 20 20 20 20 2d | 3e 20 6e 61 6d 65 20 6f |Ggw -|> name o|
|00000fa0| 66 20 74 68 69 73 20 67 | 61 74 65 77 61 79 0a 24 |f this g|ateway.$|
|00000fb0| 47 70 6f 72 74 20 20 2d | 3e 20 70 6f 72 74 20 74 |Gport -|> port t|
|00000fc0| 68 69 73 20 67 61 74 65 | 77 61 79 20 69 73 20 72 |his gate|way is r|
|00000fd0| 75 6e 6e 69 6e 67 20 6f | 6e 0a 24 47 68 6f 73 74 |unning o|n.$Ghost|
|00000fe0| 20 20 2d 3e 20 68 6f 73 | 74 20 74 68 69 73 20 67 | -> hos|t this g|
|00000ff0| 61 74 65 77 61 79 20 69 | 73 20 72 75 6e 6e 69 6e |ateway i|s runnin|
|00001000| 67 20 6f 6e 0a 0a 46 6f | 72 20 65 78 61 6d 70 6c |g on..Fo|r exampl|
|00001010| 65 2c 20 6e 6e 74 70 20 | 6d 69 67 68 74 20 64 6f |e, nntp |might do|
|00001020| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 3a 0a | the fol|lowing:.|
|00001030| 0a 26 47 72 65 70 6c 79 | 28 22 30 24 53 75 62 6a |.&Greply|("0$Subj|
|00001040| 65 63 74 5c 74 24 47 67 | 77 20 61 72 74 69 63 6c |ect\t$Gg|w articl|
|00001050| 65 20 24 67 72 6f 75 70 | 20 24 61 72 74 69 63 6c |e $group| $articl|
|00001060| 65 5c 74 24 47 68 6f 73 | 74 5c 74 24 47 70 6f 72 |e\t$Ghos|t\t$Gpor|
|00001070| 74 22 29 3b 0a 0a 53 6f | 20 77 68 65 6e 20 74 68 |t");..So| when th|
|00001080| 65 20 75 73 65 72 20 73 | 65 6c 65 63 74 73 20 74 |e user s|elects t|
|00001090| 68 69 73 20 74 68 65 79 | 20 77 69 6c 6c 20 73 65 |his they| will se|
|000010a0| 6e 64 3a 0a 0a 6e 6e 74 | 70 20 61 72 74 69 63 6c |nd:..nnt|p articl|
|000010b0| 65 20 73 75 2e 6a 6f 62 | 73 20 31 30 34 0a 0a 42 |e su.job|s 104..B|
|000010c0| 61 63 6b 20 74 6f 20 74 | 68 65 20 67 6f 34 67 77 |ack to t|he go4gw|
|000010d0| 20 64 61 65 6d 6f 6e 2c | 20 77 68 69 63 68 20 77 | daemon,| which w|
|000010e0| 69 6c 6c 20 66 69 67 75 | 72 65 20 6f 75 74 20 74 |ill figu|re out t|
|000010f0| 68 61 74 20 22 61 72 74 | 69 63 6c 65 20 73 75 2e |hat "art|icle su.|
|00001100| 6a 6f 62 73 20 31 30 34 | 22 0a 6e 65 65 64 73 20 |jobs 104|".needs |
|00001110| 74 6f 20 67 65 74 20 70 | 61 73 73 65 64 20 74 6f |to get p|assed to|
|00001120| 20 67 32 6e 6e 74 70 2e | 0a 0a 54 68 65 20 66 6f | g2nntp.|..The fo|
|00001130| 6c 6c 6f 77 69 6e 67 20 | 76 61 72 69 61 62 6c 65 |llowing |variable|
|00001140| 73 20 61 6e 64 20 72 6f | 75 74 69 6e 65 73 20 61 |s and ro|utines a|
|00001150| 72 65 20 64 65 66 69 6e | 65 64 20 69 6e 20 67 6f |re defin|ed in go|
|00001160| 34 67 77 2c 20 61 6e 64 | 20 63 61 6e 20 62 65 20 |4gw, and| can be |
|00001170| 75 73 65 64 20 0a 62 79 | 20 67 61 74 65 77 61 79 |used .by| gateway|
|00001180| 73 3a 0a 0a 24 47 6e 6f | 74 53 65 72 76 65 72 20 |s:..$Gno|tServer |
|00001190| 20 20 20 59 6f 75 20 63 | 61 6e 20 64 65 66 69 6e | You c|an defin|
|000011a0| 65 20 74 68 69 73 20 69 | 6e 20 70 65 72 6c 20 73 |e this i|n perl s|
|000011b0| 63 72 69 70 74 73 20 74 | 68 61 74 20 77 61 6e 74 |cripts t|hat want|
|000011c0| 20 74 6f 20 69 6e 63 6c | 75 64 65 0a 20 20 20 20 | to incl|ude. |
|000011d0| 20 20 20 20 20 20 20 20 | 20 20 20 74 68 65 20 67 | | the g|
|000011e0| 6f 34 67 77 20 73 63 72 | 69 70 74 20 77 69 74 68 |o4gw scr|ipt with|
|000011f0| 6f 75 74 20 72 75 6e 6e | 69 6e 67 20 74 68 65 20 |out runn|ing the |
|00001200| 73 65 72 76 65 72 2e 20 | 53 65 65 20 74 68 65 0a |server. |See the.|
|00001210| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 67 | | g|
|00001220| 32 6e 6e 74 70 5f 67 72 | 6f 75 70 73 20 73 63 72 |2nntp_gr|oups scr|
|00001230| 69 70 74 2e 0a 0a 24 47 | 67 77 20 20 20 20 20 20 |ipt...$G|gw |
|00001240| 20 20 20 20 20 43 61 6e | 20 62 65 20 75 73 65 64 | Can| be used|
|00001250| 20 62 79 20 67 61 74 65 | 77 61 79 20 72 6f 75 74 | by gate|way rout|
|00001260| 69 6e 65 73 20 74 6f 20 | 64 65 74 65 72 6d 69 6e |ines to |determin|
|00001270| 65 20 74 68 65 69 72 20 | 67 61 74 65 77 61 79 20 |e their |gateway |
|00001280| 20 20 20 20 0a 20 20 20 | 20 20 20 20 20 20 20 20 | . | |
|00001290| 20 20 20 20 6e 61 6d 65 | 2e 0a 0a 24 47 70 6f 72 | name|...$Gpor|
|000012a0| 74 20 20 20 20 20 20 20 | 20 20 43 61 6e 20 62 65 |t | Can be|
|000012b0| 20 75 73 65 64 20 62 79 | 20 67 61 74 65 77 61 79 | used by| gateway|
|000012c0| 20 72 6f 75 74 69 6e 65 | 73 20 74 6f 20 64 65 74 | routine|s to det|
|000012d0| 65 72 6d 69 6e 65 20 77 | 68 69 63 68 20 70 6f 72 |ermine w|hich por|
|000012e0| 74 20 67 6f 34 67 77 0a | 20 20 20 20 20 20 20 20 |t go4gw.| |
|000012f0| 20 20 20 20 20 20 20 69 | 73 20 72 75 6e 6e 69 6e | i|s runnin|
|00001300| 67 20 6f 6e 2e 0a 0a 24 | 47 68 6f 73 74 20 20 20 |g on...$|Ghost |
|00001310| 20 20 20 20 20 20 43 61 | 6e 20 62 65 20 75 73 65 | Ca|n be use|
|00001320| 64 20 62 79 20 67 61 74 | 65 77 61 79 20 72 6f 75 |d by gat|eway rou|
|00001330| 74 69 6e 65 73 20 74 6f | 20 64 65 74 65 72 6d 69 |tines to| determi|
|00001340| 6e 65 20 77 68 69 63 68 | 20 68 6f 73 74 20 67 6f |ne which| host go|
|00001350| 34 67 77 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |4gw. | |
|00001360| 20 20 20 69 73 20 72 75 | 6e 6e 69 6e 67 20 6f 6e | is ru|nning on|
|00001370| 2e 0a 0a 47 53 45 52 56 | 45 52 20 20 20 20 20 20 |...GSERV|ER |
|00001380| 20 20 46 69 6c 65 20 68 | 61 6e 64 6c 65 20 77 68 | File h|andle wh|
|00001390| 69 63 68 20 69 73 20 6f | 70 65 6e 65 64 20 77 68 |ich is o|pened wh|
|000013a0| 65 6e 20 47 6f 70 65 6e | 53 65 72 76 65 72 20 69 |en Gopen|Server i|
|000013b0| 73 20 63 61 6c 6c 65 64 | 2e 0a 0a 26 47 72 65 70 |s called|...&Grep|
|000013c0| 6c 79 28 72 65 70 6c 79 | 29 20 53 65 6e 64 73 20 |ly(reply|) Sends |
|000013d0| 73 74 72 69 6e 67 20 62 | 61 63 6b 20 74 6f 20 67 |string b|ack to g|
|000013e0| 6f 70 68 65 72 20 63 6c | 69 65 6e 74 20 77 69 74 |opher cl|ient wit|
|000013f0| 68 20 5c 72 5c 6e 20 6f | 6e 20 74 68 65 20 65 6e |h \r\n o|n the en|
|00001400| 64 2e 0a 0a 26 47 61 62 | 6f 72 74 28 6d 65 73 73 |d...&Gab|ort(mess|
|00001410| 29 20 20 53 65 6e 64 73 | 20 65 72 72 6f 72 20 6d |) Sends| error m|
|00001420| 65 73 73 61 67 65 20 62 | 61 63 6b 20 74 6f 20 67 |essage b|ack to g|
|00001430| 6f 70 68 65 72 20 63 6c | 69 65 6e 74 20 77 69 74 |opher cl|ient wit|
|00001440| 68 20 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |h . | |
|00001450| 20 20 22 33 6d 65 73 73 | 5c 72 5c 6e 2e 5c 72 5c | "3mess|\r\n.\r\|
|00001460| 6e 22 20 6f 6e 20 65 6e | 64 2e 0a 20 20 20 20 20 |n" on en|d.. |
|00001470| 20 20 20 20 20 20 20 20 | 20 0a 26 47 6f 70 65 6e | | .&Gopen|
|00001480| 53 65 72 76 65 72 28 73 | 65 72 76 65 72 2c 70 6f |Server(s|erver,po|
|00001490| 72 74 29 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |rt). | |
|000014a0| 20 20 20 4f 70 65 6e 73 | 20 54 43 50 20 70 6f 72 | Opens| TCP por|
|000014b0| 74 20 61 74 20 73 65 72 | 76 65 72 20 6f 72 20 63 |t at ser|ver or c|
|000014c0| 61 6c 6c 73 20 47 61 62 | 6f 72 74 2e 0a 0a 26 47 |alls Gab|ort...&G|
|000014d0| 63 6c 6f 73 65 53 65 72 | 76 65 72 20 20 43 6c 6f |closeSer|ver Clo|
|000014e0| 73 65 73 20 73 65 72 76 | 65 72 2e 0a 0a 24 47 64 |ses serv|er...$Gd|
|000014f0| 65 62 75 67 20 20 20 20 | 20 20 20 20 64 65 66 69 |ebug | defi|
|00001500| 6e 65 20 74 68 69 73 20 | 74 6f 20 74 75 72 6e 20 |ne this |to turn |
|00001510| 6f 6e 20 64 65 62 75 67 | 67 69 6e 67 20 69 6e 20 |on debug|ging in |
|00001520| 26 47 73 65 6e 64 20 61 | 6e 64 20 26 47 72 65 63 |&Gsend a|nd &Grec|
|00001530| 76 2e 0a 0a 26 47 73 65 | 6e 64 28 63 6d 64 29 20 |v...&Gse|nd(cmd) |
|00001540| 20 20 20 53 65 6e 64 73 | 20 22 63 6d 64 5c 72 5c | Sends| "cmd\r\|
|00001550| 6e 22 20 74 6f 20 47 53 | 45 52 56 45 52 2e 0a 0a |n" to GS|ERVER...|
|00001560| 24 5f 20 3d 20 26 47 72 | 65 63 76 3b 20 20 20 47 |$_ = &Gr|ecv; G|
|00001570| 65 74 73 20 72 65 73 70 | 6f 6e 73 65 20 66 72 6f |ets resp|onse fro|
|00001580| 6d 20 47 53 45 52 56 45 | 52 20 61 6e 64 20 73 74 |m GSERVE|R and st|
|00001590| 72 69 70 73 20 5c 72 20 | 61 6e 64 20 5c 6e 2e 0a |rips \r |and \n..|
|000015a0| 0a 26 47 73 6f 72 72 79 | 20 20 20 20 20 20 20 20 |.&Gsorry| |
|000015b0| 53 65 6e 64 73 20 6d 65 | 73 73 61 67 65 20 61 62 |Sends me|ssage ab|
|000015c0| 6f 75 74 20 64 61 74 61 | 20 74 68 61 74 20 63 61 |out data| that ca|
|000015d0| 6e 6e 6f 74 20 62 65 20 | 64 65 6c 69 76 65 72 65 |nnot be |delivere|
|000015e0| 64 20 64 75 65 20 74 6f | 0a 20 20 20 20 20 20 20 |d due to|. |
|000015f0| 20 20 20 20 20 20 20 20 | 72 65 73 74 72 69 63 74 | |restrict|
|00001600| 69 6f 6e 73 2e 0a 0a 4f | 74 68 65 72 20 22 73 74 |ions...O|ther "st|
|00001610| 61 6e 64 61 72 64 22 20 | 72 6f 75 74 69 6e 65 73 |andard" |routines|
|00001620| 20 61 6e 64 20 76 61 72 | 69 61 62 6c 65 73 20 6d | and var|iables m|
|00001630| 61 79 20 62 65 20 61 64 | 64 65 64 2e 20 54 68 65 |ay be ad|ded. The|
|00001640| 79 20 77 69 6c 6c 20 73 | 74 61 72 74 0a 77 69 74 |y will s|tart.wit|
|00001650| 68 20 61 20 27 47 27 2e | 0a 0a 52 6f 6c 61 6e 64 |h a 'G'.|..Roland|
|00001660| 0a 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001670| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001680| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001690| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000016a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000016b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000016c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000016d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000016e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000016f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001700| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001720| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001800| 67 6f 34 67 77 2f 67 32 | 73 6e 6d 70 00 00 00 00 |go4gw/g2|snmp....|
|00001810| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001860| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 20 |.... 6|44 . |
|00001870| 20 30 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 | 0 . | 0 . |
|00001880| 20 20 33 37 35 30 34 20 | 20 35 32 36 35 33 30 35 | 37504 | 5265305|
|00001890| 33 37 30 20 20 20 36 32 | 32 33 00 20 00 00 00 00 |370 62|23. ....|
|000018a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001900| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a00| 23 21 2f 75 73 72 2f 6c | 6f 63 61 6c 2f 62 69 6e |#!/usr/l|ocal/bin|
|00001a10| 2f 70 65 72 6c 0a 23 23 | 23 23 23 23 23 23 23 23 |/perl.##|########|
|00001a20| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001a30| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001a40| 23 23 23 23 23 23 23 23 | 23 0a 23 0a 23 20 53 74 |########|#.#.# St|
|00001a50| 61 6e 64 61 72 64 20 52 | 43 53 20 48 65 61 64 65 |andard R|CS Heade|
|00001a60| 72 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 28 73 |r inform|ation (s|
|00001a70| 65 65 20 63 6f 28 31 29 | 29 0a 23 0a 23 20 24 41 |ee co(1)|).#.# $A|
|00001a80| 75 74 68 6f 72 3a 20 73 | 63 68 65 6d 65 72 73 20 |uthor: s|chemers |
|00001a90| 24 0a 23 0a 23 20 24 44 | 61 74 65 3a 20 31 39 39 |$.#.# $D|ate: 199|
|00001aa0| 32 2f 31 30 2f 30 38 20 | 32 31 3a 34 38 3a 30 32 |2/10/08 |21:48:02|
|00001ab0| 20 24 0a 23 0a 23 20 24 | 52 65 76 69 73 69 6f 6e | $.#.# $|Revision|
|00001ac0| 3a 20 31 2e 31 20 24 0a | 23 0a 23 20 24 4c 6f 63 |: 1.1 $.|#.# $Loc|
|00001ad0| 6b 65 72 3a 20 73 63 68 | 65 6d 65 72 73 20 24 0a |ker: sch|emers $.|
|00001ae0| 23 0a 23 20 24 53 6f 75 | 72 63 65 3a 20 2f 6e 65 |#.# $Sou|rce: /ne|
|00001af0| 74 77 6f 72 6b 69 6e 67 | 2f 73 72 63 2f 67 6f 70 |tworking|/src/gop|
|00001b00| 68 65 72 2f 67 61 74 65 | 77 61 79 73 2f 67 32 73 |her/gate|ways/g2s|
|00001b10| 6e 6d 70 2c 76 20 24 0a | 23 0a 23 20 24 53 74 61 |nmp,v $.|#.# $Sta|
|00001b20| 74 65 3a 20 45 78 70 20 | 24 0a 23 0a 23 20 24 4c |te: Exp |$.#.# $L|
|00001b30| 6f 67 3a 20 67 32 73 6e | 6d 70 2c 76 20 24 0a 23 |og: g2sn|mp,v $.#|
|00001b40| 20 52 65 76 69 73 69 6f | 6e 20 31 2e 31 20 20 31 | Revisio|n 1.1 1|
|00001b50| 39 39 32 2f 31 30 2f 30 | 38 20 20 32 31 3a 34 38 |992/10/0|8 21:48|
|00001b60| 3a 30 32 20 20 73 63 68 | 65 6d 65 72 73 0a 23 20 |:02 sch|emers.# |
|00001b70| 49 6e 69 74 69 61 6c 20 | 72 65 76 69 73 69 6f 6e |Initial |revision|
|00001b80| 0a 23 0a 23 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.#.#----|--------|
|00001b90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001ba0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001bb0| 2d 2d 2d 2d 2d 2d 0a 23 | 20 43 6f 70 79 72 69 67 |------.#| Copyrig|
|00001bc0| 68 74 20 28 63 29 20 31 | 39 39 32 20 42 6f 61 72 |ht (c) 1|992 Boar|
|00001bd0| 64 20 6f 66 20 54 72 75 | 73 74 65 65 73 0a 23 20 |d of Tru|stees.# |
|00001be0| 20 20 20 20 20 20 20 20 | 20 20 20 4c 65 6c 61 6e | | Lelan|
|00001bf0| 64 20 53 74 61 6e 66 6f | 72 64 20 4a 72 2e 20 55 |d Stanfo|rd Jr. U|
|00001c00| 6e 69 76 65 72 73 69 74 | 79 0a 23 23 23 23 23 23 |niversit|y.######|
|00001c10| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001c20| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001c30| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 0a 23 20 |########|#####.# |
|00001c40| 2f 2a 0a 23 20 20 2a 20 | 52 65 64 69 73 74 72 69 |/*.# * |Redistri|
|00001c50| 62 75 74 69 6f 6e 20 61 | 6e 64 20 75 73 65 20 69 |bution a|nd use i|
|00001c60| 6e 20 73 6f 75 72 63 65 | 20 61 6e 64 20 62 69 6e |n source| and bin|
|00001c70| 61 72 79 20 66 6f 72 6d | 73 20 61 72 65 20 70 65 |ary form|s are pe|
|00001c80| 72 6d 69 74 74 65 64 0a | 23 20 20 2a 20 70 72 6f |rmitted.|# * pro|
|00001c90| 76 69 64 65 64 20 74 68 | 61 74 20 74 68 65 20 61 |vided th|at the a|
|00001ca0| 62 6f 76 65 20 63 6f 70 | 79 72 69 67 68 74 20 6e |bove cop|yright n|
|00001cb0| 6f 74 69 63 65 20 61 6e | 64 20 74 68 69 73 20 70 |otice an|d this p|
|00001cc0| 61 72 61 67 72 61 70 68 | 20 61 72 65 0a 23 20 20 |aragraph| are.# |
|00001cd0| 2a 20 64 75 70 6c 69 63 | 61 74 65 64 20 69 6e 20 |* duplic|ated in |
|00001ce0| 61 6c 6c 20 73 75 63 68 | 20 66 6f 72 6d 73 20 61 |all such| forms a|
|00001cf0| 6e 64 20 74 68 61 74 20 | 61 6e 79 20 64 6f 63 75 |nd that |any docu|
|00001d00| 6d 65 6e 74 61 74 69 6f | 6e 2c 0a 23 20 20 2a 20 |mentatio|n,.# * |
|00001d10| 61 64 76 65 72 74 69 73 | 69 6e 67 20 6d 61 74 65 |advertis|ing mate|
|00001d20| 72 69 61 6c 73 2c 20 61 | 6e 64 20 6f 74 68 65 72 |rials, a|nd other|
|00001d30| 20 6d 61 74 65 72 69 61 | 6c 73 20 72 65 6c 61 74 | materia|ls relat|
|00001d40| 65 64 20 74 6f 20 73 75 | 63 68 0a 23 20 20 2a 20 |ed to su|ch.# * |
|00001d50| 64 69 73 74 72 69 62 75 | 74 69 6f 6e 20 61 6e 64 |distribu|tion and|
|00001d60| 20 75 73 65 20 61 63 6b | 6e 6f 77 6c 65 64 67 65 | use ack|nowledge|
|00001d70| 20 74 68 61 74 20 74 68 | 65 20 73 6f 66 74 77 61 | that th|e softwa|
|00001d80| 72 65 20 77 61 73 20 64 | 65 76 65 6c 6f 70 65 64 |re was d|eveloped|
|00001d90| 0a 23 20 20 2a 20 62 79 | 20 53 74 61 6e 66 6f 72 |.# * by| Stanfor|
|00001da0| 64 20 55 6e 69 76 65 72 | 73 69 74 79 2e 20 20 54 |d Univer|sity. T|
|00001db0| 68 65 20 6e 61 6d 65 20 | 6f 66 20 74 68 65 20 55 |he name |of the U|
|00001dc0| 6e 69 76 65 72 73 69 74 | 79 20 6d 61 79 20 6e 6f |niversit|y may no|
|00001dd0| 74 20 62 65 20 75 73 65 | 64 20 0a 23 20 20 2a 20 |t be use|d .# * |
|00001de0| 74 6f 20 65 6e 64 6f 72 | 73 65 20 6f 72 20 70 72 |to endor|se or pr|
|00001df0| 6f 6d 6f 74 65 20 70 72 | 6f 64 75 63 74 73 20 64 |omote pr|oducts d|
|00001e00| 65 72 69 76 65 64 20 66 | 72 6f 6d 20 74 68 69 73 |erived f|rom this|
|00001e10| 20 73 6f 66 74 77 61 72 | 65 20 77 69 74 68 6f 75 | softwar|e withou|
|00001e20| 74 20 0a 23 20 20 2a 20 | 73 70 65 63 69 66 69 63 |t .# * |specific|
|00001e30| 20 70 72 69 6f 72 20 77 | 72 69 74 74 65 6e 20 70 | prior w|ritten p|
|00001e40| 65 72 6d 69 73 73 69 6f | 6e 2e 0a 23 20 20 2a 20 |ermissio|n..# * |
|00001e50| 54 48 49 53 20 53 4f 46 | 54 57 41 52 45 20 49 53 |THIS SOF|TWARE IS|
|00001e60| 20 50 52 4f 56 49 44 45 | 44 20 60 60 41 53 20 49 | PROVIDE|D ``AS I|
|00001e70| 53 27 27 20 41 4e 44 20 | 57 49 54 48 4f 55 54 20 |S'' AND |WITHOUT |
|00001e80| 41 4e 59 20 45 58 50 52 | 45 53 53 20 4f 52 0a 23 |ANY EXPR|ESS OR.#|
|00001e90| 20 20 2a 20 49 4d 50 4c | 49 45 44 20 57 41 52 52 | * IMPL|IED WARR|
|00001ea0| 41 4e 54 49 45 53 2c 20 | 49 4e 43 4c 55 44 49 4e |ANTIES, |INCLUDIN|
|00001eb0| 47 2c 20 57 49 54 48 4f | 55 54 20 4c 49 4d 49 54 |G, WITHO|UT LIMIT|
|00001ec0| 41 54 49 4f 4e 2c 20 54 | 48 45 20 49 4d 50 4c 49 |ATION, T|HE IMPLI|
|00001ed0| 45 44 0a 23 20 20 2a 20 | 57 41 52 52 41 4e 54 49 |ED.# * |WARRANTI|
|00001ee0| 45 53 20 4f 46 20 4d 45 | 52 43 48 41 4e 54 49 42 |ES OF ME|RCHANTIB|
|00001ef0| 49 4c 49 54 59 20 41 4e | 44 20 46 49 54 4e 45 53 |ILITY AN|D FITNES|
|00001f00| 53 20 46 4f 52 20 41 20 | 50 41 52 54 49 43 55 4c |S FOR A |PARTICUL|
|00001f10| 41 52 20 50 55 52 50 4f | 53 45 2e 0a 23 20 20 2a |AR PURPO|SE..# *|
|00001f20| 2f 0a 23 20 0a 23 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/.# .#--|--------|
|00001f30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001f40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001f50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001f60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0a 23 20 76 |--------|----.# v|
|00001f70| 61 72 69 61 62 6c 65 73 | 20 79 6f 75 20 73 68 6f |ariables| you sho|
|00001f80| 75 6c 64 20 63 68 61 6e | 67 65 3a 0a 0a 24 73 6e |uld chan|ge:..$sn|
|00001f90| 6d 70 5f 74 61 62 6c 65 | 20 3d 20 22 2f 75 73 72 |mp_table| = "/usr|
|00001fa0| 2f 6c 6f 63 61 6c 2f 62 | 69 6e 2f 73 6e 6d 70 2d |/local/b|in/snmp-|
|00001fb0| 74 61 62 6c 65 22 3b 0a | 0a 23 2d 2d 2d 2d 2d 2d |table";.|.#------|
|00001fc0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001fd0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001fe0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001ff0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002000| 0a 0a 0a 73 75 62 20 73 | 6e 6d 70 5f 6d 61 69 6e |...sub s|nmp_main|
|00002010| 20 7b 0a 20 6c 6f 63 61 | 6c 28 24 5f 29 20 3d 20 | {. loca|l($_) = |
|00002020| 40 5f 3b 0a 0a 20 69 66 | 20 28 2f 5e 24 2f 29 20 |@_;.. if| (/^$/) |
|00002030| 7b 0a 20 20 20 20 26 47 | 72 65 70 6c 79 28 22 37 |{. &G|reply("7|
|00002040| 53 4e 4d 50 20 41 67 65 | 6e 74 5c 74 24 47 67 77 |SNMP Age|nt\t$Ggw|
|00002050| 20 6d 65 6e 75 5c 74 24 | 47 68 6f 73 74 5c 74 24 | menu\t$|Ghost\t$|
|00002060| 47 70 6f 72 74 22 29 3b | 0a 20 20 20 20 26 47 72 |Gport");|. &Gr|
|00002070| 65 70 6c 79 28 22 2e 22 | 29 3b 0a 20 20 20 20 65 |eply("."|);. e|
|00002080| 78 69 74 28 30 29 3b 0a | 20 7d 0a 0a 69 66 20 28 |xit(0);.| }..if (|
|00002090| 2f 5e 6d 65 6e 75 5c 73 | 2b 28 2e 2a 29 2f 69 29 |/^menu\s|+(.*)/i)|
|000020a0| 20 20 20 20 20 20 20 20 | 20 7b 20 20 26 64 6f 5f | | { &do_|
|000020b0| 6d 65 6e 75 28 24 31 29 | 3b 20 20 7d 20 0a 65 6c |menu($1)|; } .el|
|000020c0| 73 69 66 20 28 2f 5e 61 | 74 5c 73 2b 28 2e 2a 29 |sif (/^a|t\s+(.*)|
|000020d0| 2f 69 29 20 20 20 20 20 | 20 20 20 7b 20 20 26 64 |/i) | { &d|
|000020e0| 75 6d 70 5f 61 74 28 24 | 31 29 3b 20 7d 0a 65 6c |ump_at($|1); }.el|
|000020f0| 73 69 66 20 28 2f 5e 73 | 79 73 74 65 6d 5c 73 2b |sif (/^s|ystem\s+|
|00002100| 28 2e 2a 29 2f 69 29 20 | 20 20 20 7b 20 20 26 64 |(.*)/i) | { &d|
|00002110| 75 6d 70 5f 73 79 73 74 | 65 6d 28 24 31 29 3b 20 |ump_syst|em($1); |
|00002120| 7d 0a 65 6c 73 69 66 20 | 28 2f 5e 69 6e 74 65 72 |}.elsif |(/^inter|
|00002130| 66 61 63 65 5c 73 2b 28 | 2e 2a 29 2f 69 29 20 7b |face\s+(|.*)/i) {|
|00002140| 20 20 26 64 75 6d 70 5f | 69 6e 74 65 72 66 61 63 | &dump_|interfac|
|00002150| 65 28 24 31 29 3b 20 7d | 0a 65 6c 73 69 66 20 28 |e($1); }|.elsif (|
|00002160| 2f 5e 69 70 5c 73 2b 28 | 2e 2a 29 2f 69 29 20 7b |/^ip\s+(|.*)/i) {|
|00002170| 20 20 26 64 75 6d 70 5f | 69 70 28 24 31 29 3b 20 | &dump_|ip($1); |
|00002180| 7d 0a 65 6c 73 69 66 20 | 28 2f 5e 69 63 6d 70 5c |}.elsif |(/^icmp\|
|00002190| 73 2b 28 2e 2a 29 2f 69 | 29 20 7b 20 20 26 64 75 |s+(.*)/i|) { &du|
|000021a0| 6d 70 5f 69 63 6d 70 28 | 24 31 29 3b 20 7d 0a 65 |mp_icmp(|$1); }.e|
|000021b0| 6c 73 69 66 20 28 2f 5e | 74 63 70 5c 73 2b 28 2e |lsif (/^|tcp\s+(.|
|000021c0| 2a 29 2f 69 29 20 7b 20 | 20 26 64 75 6d 70 5f 74 |*)/i) { | &dump_t|
|000021d0| 63 70 28 24 31 29 3b 20 | 7d 0a 65 6c 73 69 66 20 |cp($1); |}.elsif |
|000021e0| 28 2f 5e 75 64 70 5c 73 | 2b 28 2e 2a 29 2f 69 29 |(/^udp\s|+(.*)/i)|
|000021f0| 20 7b 20 20 26 64 75 6d | 70 5f 75 64 70 28 24 31 | { &dum|p_udp($1|
|00002200| 29 3b 20 7d 0a 65 6c 73 | 65 20 7b 0a 20 20 26 47 |); }.els|e {. &G|
|00002210| 61 62 6f 72 74 28 22 55 | 6e 6b 6e 6f 77 6e 20 63 |abort("U|nknown c|
|00002220| 6f 6d 6d 61 6e 64 21 22 | 29 3b 0a 20 20 65 78 69 |ommand!"|);. exi|
|00002230| 74 3b 0a 7d 0a 0a 7d 0a | 0a 73 75 62 20 64 6f 5f |t;.}..}.|.sub do_|
|00002240| 6d 65 6e 75 20 7b 0a 20 | 20 20 20 6c 6f 63 61 6c |menu {. | local|
|00002250| 28 24 61 67 65 6e 74 29 | 3d 40 5f 3b 0a 20 20 20 |($agent)|=@_;. |
|00002260| 20 26 47 72 65 70 6c 79 | 28 22 30 41 64 64 72 65 | &Greply|("0Addre|
|00002270| 73 73 20 54 72 61 6e 73 | 6c 61 74 69 6f 6e 20 47 |ss Trans|lation G|
|00002280| 72 6f 75 70 5c 74 24 47 | 67 77 20 61 74 20 24 61 |roup\t$G|gw at $a|
|00002290| 67 65 6e 74 5c 74 24 47 | 68 6f 73 74 5c 74 24 47 |gent\t$G|host\t$G|
|000022a0| 70 6f 72 74 22 29 3b 0a | 20 20 20 20 26 47 72 65 |port");.| &Gre|
|000022b0| 70 6c 79 28 22 30 49 6e | 74 65 72 66 61 63 65 20 |ply("0In|terface |
|000022c0| 47 72 6f 75 70 5c 74 24 | 47 67 77 20 69 6e 74 65 |Group\t$|Ggw inte|
|000022d0| 72 66 61 63 65 20 24 61 | 67 65 6e 74 5c 74 24 47 |rface $a|gent\t$G|
|000022e0| 68 6f 73 74 5c 74 24 47 | 70 6f 72 74 22 29 3b 0a |host\t$G|port");.|
|000022f0| 20 20 20 20 26 47 72 65 | 70 6c 79 28 22 30 49 43 | &Gre|ply("0IC|
|00002300| 4d 50 20 47 72 6f 75 70 | 5c 74 24 47 67 77 20 69 |MP Group|\t$Ggw i|
|00002310| 63 6d 70 20 24 61 67 65 | 6e 74 5c 74 24 47 68 6f |cmp $age|nt\t$Gho|
|00002320| 73 74 5c 74 24 47 70 6f | 72 74 22 29 3b 0a 20 20 |st\t$Gpo|rt");. |
|00002330| 20 20 26 47 72 65 70 6c | 79 28 22 30 49 50 20 47 | &Grepl|y("0IP G|
|00002340| 72 6f 75 70 5c 74 24 47 | 67 77 20 69 70 20 24 61 |roup\t$G|gw ip $a|
|00002350| 67 65 6e 74 5c 74 24 47 | 68 6f 73 74 5c 74 24 47 |gent\t$G|host\t$G|
|00002360| 70 6f 72 74 22 29 3b 0a | 20 20 20 20 26 47 72 65 |port");.| &Gre|
|00002370| 70 6c 79 28 22 30 53 79 | 73 74 65 6d 20 47 72 6f |ply("0Sy|stem Gro|
|00002380| 75 70 5c 74 24 47 67 77 | 20 73 79 73 74 65 6d 20 |up\t$Ggw| system |
|00002390| 24 61 67 65 6e 74 5c 74 | 24 47 68 6f 73 74 5c 74 |$agent\t|$Ghost\t|
|000023a0| 24 47 70 6f 72 74 22 29 | 3b 0a 20 20 20 20 26 47 |$Gport")|;. &G|
|000023b0| 72 65 70 6c 79 28 22 30 | 54 43 50 20 47 72 6f 75 |reply("0|TCP Grou|
|000023c0| 70 5c 74 24 47 67 77 20 | 74 63 70 20 24 61 67 65 |p\t$Ggw |tcp $age|
|000023d0| 6e 74 5c 74 24 47 68 6f | 73 74 5c 74 24 47 70 6f |nt\t$Gho|st\t$Gpo|
|000023e0| 72 74 22 29 3b 0a 20 20 | 20 20 26 47 72 65 70 6c |rt");. | &Grepl|
|000023f0| 79 28 22 30 55 44 50 20 | 47 72 6f 75 70 5c 74 24 |y("0UDP |Group\t$|
|00002400| 47 67 77 20 75 64 70 20 | 24 61 67 65 6e 74 5c 74 |Ggw udp |$agent\t|
|00002410| 24 47 68 6f 73 74 5c 74 | 24 47 70 6f 72 74 22 29 |$Ghost\t|$Gport")|
|00002420| 3b 0a 20 20 20 20 26 47 | 72 65 70 6c 79 28 22 2e |;. &G|reply(".|
|00002430| 22 29 3b 0a 20 20 20 20 | 65 78 69 74 28 30 29 3b |");. |exit(0);|
|00002440| 0a 7d 0a 0a 0a 63 68 6f | 70 28 24 64 61 74 65 3d |.}...cho|p($date=|
|00002450| 60 64 61 74 65 60 29 3b | 0a 0a 25 69 66 54 79 70 |`date`);|..%ifTyp|
|00002460| 65 32 61 20 3d 20 28 0a | 20 20 20 20 20 20 20 20 |e2a = (.| |
|00002470| 31 2c 20 27 6f 74 68 65 | 72 27 2c 0a 20 20 20 20 |1, 'othe|r',. |
|00002480| 20 20 20 20 32 2c 20 27 | 72 65 67 75 6c 61 72 31 | 2, '|regular1|
|00002490| 38 32 32 27 2c 0a 09 33 | 2c 20 27 68 64 68 31 38 |822',..3|, 'hdh18|
|000024a0| 32 32 27 2c 0a 09 34 2c | 20 27 64 64 6e 2d 78 32 |22',..4,| 'ddn-x2|
|000024b0| 35 27 2c 0a 09 35 2c 20 | 27 72 66 63 38 37 37 2d |5',..5, |'rfc877-|
|000024c0| 78 32 35 27 2c 0a 09 36 | 2c 20 27 65 74 68 65 72 |x25',..6|, 'ether|
|000024d0| 6e 65 74 2d 63 73 6d 61 | 63 64 27 2c 0a 09 37 2c |net-csma|cd',..7,|
|000024e0| 20 27 69 73 6f 38 38 30 | 32 33 2d 63 73 6d 61 63 | 'iso880|23-csmac|
|000024f0| 64 27 2c 0a 09 38 2c 20 | 27 69 73 6f 38 38 30 32 |d',..8, |'iso8802|
|00002500| 34 2d 74 6f 6b 65 6e 42 | 75 73 27 2c 0a 09 39 2c |4-tokenB|us',..9,|
|00002510| 20 27 69 73 6f 38 38 30 | 32 35 2d 74 6f 6b 65 6e | 'iso880|25-token|
|00002520| 52 69 6e 67 27 2c 0a 09 | 31 30 2c 27 20 69 73 6f |Ring',..|10,' iso|
|00002530| 38 38 30 32 36 2d 6d 61 | 6e 27 2c 0a 09 31 31 2c |88026-ma|n',..11,|
|00002540| 27 20 73 74 61 72 4c 61 | 6e 27 2c 0a 09 31 32 2c |' starLa|n',..12,|
|00002550| 27 20 70 72 6f 74 65 6f | 6e 2d 31 30 4d 62 69 74 |' proteo|n-10Mbit|
|00002560| 27 2c 0a 09 31 33 2c 27 | 20 70 72 6f 74 65 6f 6e |',..13,'| proteon|
|00002570| 2d 38 30 4d 62 69 74 27 | 2c 0a 09 31 34 2c 27 20 |-80Mbit'|,..14,' |
|00002580| 68 79 70 65 72 63 68 61 | 6e 6e 65 6c 27 2c 0a 09 |hypercha|nnel',..|
|00002590| 31 35 2c 27 20 66 64 64 | 69 27 2c 0a 09 31 36 2c |15,' fdd|i',..16,|
|000025a0| 27 20 6c 61 70 62 27 2c | 0a 09 31 37 2c 27 20 73 |' lapb',|..17,' s|
|000025b0| 64 6c 63 27 2c 0a 09 31 | 38 2c 27 20 64 73 31 27 |dlc',..1|8,' ds1'|
|000025c0| 2c 0a 09 31 39 2c 27 20 | 65 31 27 2c 0a 09 32 30 |,..19,' |e1',..20|
|000025d0| 2c 27 20 62 61 73 69 63 | 49 53 44 4e 27 2c 0a 09 |,' basic|ISDN',..|
|000025e0| 32 31 2c 27 20 70 72 69 | 6d 61 72 79 49 53 44 4e |21,' pri|maryISDN|
|000025f0| 27 2c 0a 09 32 32 2c 27 | 20 70 72 6f 70 50 6f 69 |',..22,'| propPoi|
|00002600| 6e 74 54 6f 50 6f 69 6e | 74 53 65 72 69 61 6c 27 |ntToPoin|tSerial'|
|00002610| 2c 0a 09 32 33 2c 27 20 | 70 70 70 27 2c 0a 09 32 |,..23,' |ppp',..2|
|00002620| 34 2c 27 73 6f 66 74 77 | 61 72 65 4c 6f 6f 70 62 |4,'softw|areLoopb|
|00002630| 61 63 6b 27 2c 0a 09 32 | 35 2c 27 20 65 6f 6e 2c |ack',..2|5,' eon,|
|00002640| 27 2c 0a 09 32 36 2c 27 | 20 65 74 68 65 72 6e 65 |',..26,'| etherne|
|00002650| 74 2d 33 4d 62 69 74 27 | 2c 0a 09 32 37 2c 27 20 |t-3Mbit'|,..27,' |
|00002660| 6e 73 69 70 27 2c 0a 09 | 32 38 2c 27 20 73 6c 69 |nsip',..|28,' sli|
|00002670| 70 27 2c 0a 09 32 39 2c | 27 20 75 6c 74 72 61 27 |p',..29,|' ultra'|
|00002680| 2c 0a 09 33 30 2c 27 20 | 64 73 33 27 2c 0a 09 33 |,..30,' |ds3',..3|
|00002690| 31 2c 27 20 73 69 70 27 | 2c 0a 09 33 32 2c 27 20 |1,' sip'|,..32,' |
|000026a0| 66 72 61 6d 65 2d 72 65 | 6c 61 79 27 0a 29 3b 0a |frame-re|lay'.);.|
|000026b0| 0a 25 69 66 41 64 6d 69 | 6e 53 74 61 74 75 73 32 |.%ifAdmi|nStatus2|
|000026c0| 61 20 3d 20 28 31 2c 27 | 75 70 27 2c 32 2c 27 64 |a = (1,'|up',2,'d|
|000026d0| 6f 77 6e 27 2c 33 2c 27 | 74 65 73 74 69 6e 67 27 |own',3,'|testing'|
|000026e0| 29 3b 0a 25 69 66 4f 70 | 65 72 53 74 61 74 75 73 |);.%ifOp|erStatus|
|000026f0| 32 61 20 3d 20 25 69 66 | 41 64 6d 69 6e 53 74 61 |2a = %if|AdminSta|
|00002700| 74 75 73 32 61 20 3b 0a | 0a 25 69 66 52 6f 75 74 |tus2a ;.|.%ifRout|
|00002710| 65 54 79 70 65 32 61 3d | 28 31 2c 27 6f 74 68 65 |eType2a=|(1,'othe|
|00002720| 72 27 2c 32 2c 27 69 6e | 76 61 6c 69 64 27 2c 33 |r',2,'in|valid',3|
|00002730| 2c 27 64 69 72 65 63 74 | 27 2c 34 2c 27 72 65 6d |,'direct|',4,'rem|
|00002740| 6f 74 65 27 29 3b 0a 0a | 25 69 70 4e 65 74 54 6f |ote');..|%ipNetTo|
|00002750| 4d 65 64 69 61 54 79 70 | 65 32 61 3d 28 31 2c 27 |MediaTyp|e2a=(1,'|
|00002760| 6f 74 68 65 72 27 2c 32 | 2c 27 69 6e 76 61 6c 69 |other',2|,'invali|
|00002770| 64 27 2c 33 2c 27 64 79 | 6e 61 6d 69 63 27 2c 34 |d',3,'dy|namic',4|
|00002780| 2c 27 73 74 61 74 69 63 | 27 29 3b 0a 0a 25 74 63 |,'static|');..%tc|
|00002790| 70 43 6f 6e 6e 53 74 61 | 74 65 32 61 3d 28 31 2c |pConnSta|te2a=(1,|
|000027a0| 27 63 6c 6f 73 65 64 27 | 2c 32 2c 27 6c 69 73 74 |'closed'|,2,'list|
|000027b0| 65 6e 27 2c 33 2c 27 73 | 79 6e 53 65 6e 74 27 2c |en',3,'s|ynSent',|
|000027c0| 34 2c 27 73 79 6e 52 65 | 63 65 69 76 65 64 27 2c |4,'synRe|ceived',|
|000027d0| 0a 20 20 20 20 20 20 20 | 20 20 20 35 2c 27 65 73 |. | 5,'es|
|000027e0| 74 61 62 6c 69 73 68 65 | 64 27 2c 36 2c 27 66 69 |tablishe|d',6,'fi|
|000027f0| 6e 57 61 69 74 31 27 2c | 37 2c 27 66 69 6e 57 61 |nWait1',|7,'finWa|
|00002800| 69 74 32 27 2c 38 2c 27 | 63 6c 6f 73 65 57 61 69 |it2',8,'|closeWai|
|00002810| 74 27 2c 0a 20 20 20 20 | 20 20 20 20 20 20 39 2c |t',. | 9,|
|00002820| 27 6c 61 73 74 41 63 6b | 27 2c 31 30 2c 27 63 6c |'lastAck|',10,'cl|
|00002830| 6f 73 69 6e 67 27 2c 31 | 31 2c 27 74 69 6d 65 57 |osing',1|1,'timeW|
|00002840| 61 69 74 27 29 3b 0a 0a | 25 69 70 46 6f 72 77 61 |ait');..|%ipForwa|
|00002850| 72 64 69 6e 67 32 61 3d | 28 31 2c 27 67 61 74 65 |rding2a=|(1,'gate|
|00002860| 77 61 79 27 2c 32 2c 27 | 68 6f 73 74 27 29 3b 0a |way',2,'|host');.|
|00002870| 0a 25 74 63 70 52 74 6f | 41 6c 67 6f 72 69 74 68 |.%tcpRto|Algorith|
|00002880| 6d 32 61 20 3d 20 28 31 | 2c 27 6f 74 68 65 72 27 |m2a = (1|,'other'|
|00002890| 2c 32 2c 27 63 6f 6e 73 | 74 61 6e 74 27 2c 33 2c |,2,'cons|tant',3,|
|000028a0| 27 72 73 72 65 27 2c 34 | 2c 27 76 61 6e 6a 27 29 |'rsre',4|,'vanj')|
|000028b0| 3b 0a 0a 73 75 62 20 73 | 79 73 53 65 72 76 69 63 |;..sub s|ysServic|
|000028c0| 65 73 32 61 20 7b 0a 20 | 20 6c 6f 63 61 6c 28 24 |es2a {. | local($|
|000028d0| 78 29 20 3d 20 40 5f 3b | 0a 20 20 6c 6f 63 61 6c |x) = @_;|. local|
|000028e0| 28 24 72 65 73 75 6c 74 | 29 3b 0a 0a 20 20 24 72 |($result|);.. $r|
|000028f0| 65 73 75 6c 74 20 2e 3d | 20 22 70 68 79 73 69 63 |esult .=| "physic|
|00002900| 61 6c 2c 20 22 20 69 66 | 20 28 24 78 20 26 20 31 |al, " if| ($x & 1|
|00002910| 29 3b 0a 20 20 24 72 65 | 73 75 6c 74 20 2e 3d 20 |);. $re|sult .= |
|00002920| 22 64 61 74 61 2d 6c 69 | 6e 6b 2c 20 22 20 69 66 |"data-li|nk, " if|
|00002930| 20 28 24 78 20 26 20 32 | 29 3b 0a 20 20 24 72 65 | ($x & 2|);. $re|
|00002940| 73 75 6c 74 20 2e 3d 20 | 22 69 6e 74 65 72 6e 65 |sult .= |"interne|
|00002950| 74 2c 20 22 20 69 66 20 | 28 24 78 20 26 20 34 29 |t, " if |($x & 4)|
|00002960| 3b 20 20 20 0a 20 20 24 | 72 65 73 75 6c 74 20 2e |; . $|result .|
|00002970| 3d 20 22 65 6e 64 2d 74 | 6f 2d 65 6e 64 2c 20 22 |= "end-t|o-end, "|
|00002980| 20 69 66 20 28 24 78 20 | 26 20 38 29 3b 20 0a 20 | if ($x |& 8); . |
|00002990| 20 24 72 65 73 75 6c 74 | 20 2e 3d 20 22 61 70 70 | $result| .= "app|
|000029a0| 6c 69 63 61 74 69 6f 6e | 2c 20 22 20 69 66 20 28 |lication|, " if (|
|000029b0| 24 78 20 26 20 36 34 29 | 3b 0a 0a 20 20 24 72 65 |$x & 64)|;.. $re|
|000029c0| 73 75 6c 74 20 3d 7e 20 | 73 2f 2c 20 24 2f 2f 3b |sult =~ |s/, $//;|
|000029d0| 0a 20 20 72 65 74 75 72 | 6e 20 24 72 65 73 75 6c |. retur|n $resul|
|000029e0| 74 3b 0a 7d 0a 0a 73 75 | 62 20 74 69 6d 65 54 69 |t;.}..su|b timeTi|
|000029f0| 63 6b 73 32 61 20 7b 0a | 20 20 6c 6f 63 61 6c 28 |cks2a {.| local(|
|00002a00| 24 74 69 63 6b 73 29 3d | 20 40 5f 3b 0a 20 20 6c |$ticks)=| @_;. l|
|00002a10| 6f 63 61 6c 28 24 64 2c | 24 68 2c 24 6d 2c 24 73 |ocal($d,|$h,$m,$s|
|00002a20| 2c 24 72 65 73 75 6c 74 | 29 3b 0a 20 20 0a 20 20 |,$result|);. . |
|00002a30| 24 74 69 63 6b 73 20 2f | 3d 20 31 30 30 3b 0a 0a |$ticks /|= 100;..|
|00002a40| 20 20 24 64 20 3d 20 69 | 6e 74 28 24 74 69 63 6b | $d = i|nt($tick|
|00002a50| 73 20 2f 20 28 36 30 20 | 2a 20 36 30 20 2a 20 32 |s / (60 |* 60 * 2|
|00002a60| 34 29 29 3b 0a 20 20 24 | 74 69 63 6b 73 20 25 3d |4));. $|ticks %=|
|00002a70| 20 28 36 30 2a 36 30 2a | 32 34 29 3b 0a 0a 20 20 | (60*60*|24);.. |
|00002a80| 24 68 20 3d 20 69 6e 74 | 28 24 74 69 63 6b 73 20 |$h = int|($ticks |
|00002a90| 2f 20 28 36 30 20 2a 20 | 36 30 29 29 3b 0a 20 20 |/ (60 * |60));. |
|00002aa0| 24 74 69 63 6b 73 20 25 | 3d 20 28 36 30 2a 36 30 |$ticks %|= (60*60|
|00002ab0| 29 3b 0a 20 0a 20 20 24 | 6d 20 3d 20 69 6e 74 28 |);. . $|m = int(|
|00002ac0| 24 74 69 63 6b 73 2f 36 | 30 29 3b 0a 20 20 24 73 |$ticks/6|0);. $s|
|00002ad0| 20 3d 20 24 74 69 63 6b | 73 20 25 20 36 30 3b 0a | = $tick|s % 60;.|
|00002ae0| 0a 20 20 24 72 65 73 75 | 6c 74 20 3d 20 73 70 72 |. $resu|lt = spr|
|00002af0| 69 6e 74 66 28 22 25 64 | 3a 25 30 32 64 3a 25 30 |intf("%d|:%02d:%0|
|00002b00| 32 64 22 2c 24 68 2c 24 | 6d 2c 24 73 29 3b 0a 20 |2d",$h,$|m,$s);. |
|00002b10| 20 69 66 20 28 24 64 3d | 3d 31 29 20 7b 0a 20 20 | if ($d=|=1) {. |
|00002b20| 20 20 20 20 20 20 24 72 | 65 73 75 6c 74 20 3d 20 | $r|esult = |
|00002b30| 73 70 72 69 6e 74 66 28 | 22 25 64 20 64 61 79 20 |sprintf(|"%d day |
|00002b40| 22 2c 24 64 29 20 2e 20 | 24 72 65 73 75 6c 74 3b |",$d) . |$result;|
|00002b50| 0a 20 20 7d 20 65 6c 73 | 69 66 20 28 24 64 3e 31 |. } els|if ($d>1|
|00002b60| 29 20 7b 0a 20 20 20 20 | 20 20 20 20 24 72 65 73 |) {. | $res|
|00002b70| 75 6c 74 20 3d 20 73 70 | 72 69 6e 74 66 28 22 25 |ult = sp|rintf("%|
|00002b80| 64 20 64 61 79 73 20 22 | 2c 24 64 29 20 2e 20 24 |d days "|,$d) . $|
|00002b90| 72 65 73 75 6c 74 3b 0a | 20 20 7d 0a 20 20 72 65 |result;.| }. re|
|00002ba0| 74 75 72 6e 20 24 72 65 | 73 75 6c 74 3b 0a 0a 7d |turn $re|sult;..}|
|00002bb0| 0a 0a 73 75 62 20 68 65 | 78 53 74 72 69 6e 67 32 |..sub he|xString2|
|00002bc0| 61 20 7b 0a 20 20 20 6c | 6f 63 61 6c 28 24 73 74 |a {. l|ocal($st|
|00002bd0| 72 69 6e 67 29 20 3d 20 | 40 5f 3b 0a 20 20 20 6c |ring) = |@_;. l|
|00002be0| 6f 63 61 6c 28 24 72 65 | 73 75 6c 74 2c 24 6e 29 |ocal($re|sult,$n)|
|00002bf0| 3b 0a 20 20 20 20 20 0a | 20 20 20 66 6f 72 65 61 |;. .| forea|
|00002c00| 63 68 20 28 73 70 6c 69 | 74 28 2f 3a 2f 2c 24 73 |ch (spli|t(/:/,$s|
|00002c10| 74 72 69 6e 67 29 29 20 | 7b 0a 20 20 20 20 20 20 |tring)) |{. |
|00002c20| 20 24 6e 20 3d 20 6f 63 | 74 28 22 30 78 24 5f 22 | $n = oc|t("0x$_"|
|00002c30| 29 3b 0a 20 20 20 20 20 | 20 20 6c 61 73 74 20 69 |);. | last i|
|00002c40| 66 20 21 24 6e 3b 0a 20 | 20 20 20 20 20 20 24 72 |f !$n;. | $r|
|00002c50| 65 73 75 6c 74 20 2e 3d | 20 73 70 72 69 6e 74 66 |esult .=| sprintf|
|00002c60| 28 22 25 63 22 2c 24 6e | 29 3b 0a 20 20 20 7d 0a |("%c",$n|);. }.|
|00002c70| 20 20 20 24 72 65 73 75 | 6c 74 3b 0a 7d 0a 0a 73 | $resu|lt;.}..s|
|00002c80| 75 62 20 64 75 6d 70 5f | 73 79 73 74 65 6d 20 7b |ub dump_|system {|
|00002c90| 0a 0a 20 20 6c 6f 63 61 | 6c 28 24 68 6f 73 74 29 |.. loca|l($host)|
|00002ca0| 20 3d 20 40 5f 3b 0a 20 | 20 6c 6f 63 61 6c 28 2a | = @_;. | local(*|
|00002cb0| 69 6e 74 29 3b 0a 0a 20 | 20 26 67 65 74 5f 74 61 |int);.. | &get_ta|
|00002cc0| 62 6c 65 28 24 68 6f 73 | 74 2c 22 73 79 73 74 65 |ble($hos|t,"syste|
|00002cd0| 6d 22 2c 2a 69 6e 74 29 | 3b 0a 0a 20 20 20 20 70 |m",*int)|;.. p|
|00002ce0| 72 69 6e 74 20 22 5c 6e | 22 3b 0a 20 20 20 20 70 |rint "\n|";. p|
|00002cf0| 72 69 6e 74 20 22 48 6f | 73 74 3a 20 24 68 6f 73 |rint "Ho|st: $hos|
|00002d00| 74 5c 6e 44 61 74 65 3a | 20 24 64 61 74 65 5c 6e |t\nDate:| $date\n|
|00002d10| 22 3b 0a 20 20 20 20 70 | 72 69 6e 74 20 22 5c 6e |";. p|rint "\n|
|00002d20| 22 3b 0a 20 20 20 20 70 | 72 69 6e 74 20 22 20 22 |";. p|rint " "|
|00002d30| 2a 33 30 2c 22 53 79 73 | 74 65 6d 20 54 61 62 6c |*30,"Sys|tem Tabl|
|00002d40| 65 5c 6e 22 3b 0a 20 20 | 20 20 70 72 69 6e 74 20 |e\n";. | print |
|00002d50| 22 53 79 73 74 65 6d 20 | 44 65 73 63 72 69 70 74 |"System |Descript|
|00002d60| 69 6f 6e 5c 6e 20 20 22 | 2c 20 24 69 6e 74 7b 22 |ion\n "|, $int{"|
|00002d70| 73 79 73 44 65 73 63 72 | 5b 30 5d 22 7d 2c 22 5c |sysDescr|[0]"},"\|
|00002d80| 6e 5c 6e 22 3b 0a 20 20 | 20 20 70 72 69 6e 74 20 |n\n";. | print |
|00002d90| 22 55 70 54 69 6d 65 20 | 20 20 20 20 20 20 22 2c |"UpTime | ",|
|00002da0| 20 26 74 69 6d 65 54 69 | 63 6b 73 32 61 28 24 69 | &timeTi|cks2a($i|
|00002db0| 6e 74 7b 22 73 79 73 55 | 70 54 69 6d 65 5b 30 5d |nt{"sysU|pTime[0]|
|00002dc0| 22 7d 29 2c 22 5c 6e 22 | 3b 0a 20 20 20 20 70 72 |"}),"\n"|;. pr|
|00002dd0| 69 6e 74 20 22 4f 62 6a | 65 63 74 49 44 20 20 20 |int "Obj|ectID |
|00002de0| 20 20 22 2c 20 24 69 6e | 74 7b 22 73 79 73 4f 62 | ", $in|t{"sysOb|
|00002df0| 6a 65 63 74 49 44 5b 30 | 5d 22 7d 2c 22 5c 6e 22 |jectID[0|]"},"\n"|
|00002e00| 3b 0a 20 20 20 20 24 73 | 79 73 4e 61 6d 65 20 3d |;. $s|ysName =|
|00002e10| 20 20 24 69 6e 74 7b 22 | 73 79 73 4e 61 6d 65 5b | $int{"|sysName[|
|00002e20| 30 5d 22 7d 3b 0a 20 20 | 20 20 24 73 79 73 43 6f |0]"};. | $sysCo|
|00002e30| 6e 74 61 63 74 20 3d 20 | 24 69 6e 74 7b 22 73 79 |ntact = |$int{"sy|
|00002e40| 73 43 6f 6e 74 61 63 74 | 5b 30 5d 22 7d 3b 0a 20 |sContact|[0]"};. |
|00002e50| 20 20 20 24 73 79 73 4c | 6f 63 61 74 69 6f 6e 20 | $sysL|ocation |
|00002e60| 3d 20 24 69 6e 74 7b 22 | 73 79 73 4c 6f 63 61 74 |= $int{"|sysLocat|
|00002e70| 69 6f 6e 5b 30 5d 22 7d | 3b 0a 20 20 20 20 24 73 |ion[0]"}|;. $s|
|00002e80| 79 73 53 65 72 76 69 63 | 65 73 20 3d 20 24 69 6e |ysServic|es = $in|
|00002e90| 74 7b 22 73 79 73 53 65 | 72 76 69 63 65 73 5b 30 |t{"sysSe|rvices[0|
|00002ea0| 5d 22 7d 3b 0a 20 20 20 | 20 69 66 20 28 24 73 79 |]"};. | if ($sy|
|00002eb0| 73 4e 61 6d 65 20 7c 7c | 20 24 73 79 73 43 6f 6e |sName ||| $sysCon|
|00002ec0| 74 61 63 74 20 7c 7c 20 | 24 73 79 73 4c 6f 63 61 |tact || |$sysLoca|
|00002ed0| 74 69 6f 6e 20 7c 7c 20 | 24 73 79 73 53 65 72 76 |tion || |$sysServ|
|00002ee0| 69 63 65 73 29 20 7b 0a | 20 20 20 20 70 72 69 6e |ices) {.| prin|
|00002ef0| 74 20 22 4e 61 6d 65 20 | 20 20 20 20 20 20 20 20 |t "Name | |
|00002f00| 24 73 79 73 4e 61 6d 65 | 5c 6e 22 3b 0a 20 20 20 |$sysName|\n";. |
|00002f10| 20 70 72 69 6e 74 20 22 | 43 6f 6e 74 61 63 74 20 | print "|Contact |
|00002f20| 20 20 20 20 20 24 73 79 | 73 43 6f 6e 74 61 63 74 | $sy|sContact|
|00002f30| 5c 6e 22 3b 0a 20 20 20 | 20 70 72 69 6e 74 20 22 |\n";. | print "|
|00002f40| 4c 6f 63 61 74 69 6f 6e | 20 20 20 20 20 24 73 79 |Location| $sy|
|00002f50| 73 4c 6f 63 61 74 69 6f | 6e 5c 6e 22 3b 0a 20 20 |sLocatio|n\n";. |
|00002f60| 20 20 70 72 69 6e 74 20 | 22 53 65 72 76 69 63 65 | print |"Service|
|00002f70| 73 20 20 20 20 20 22 2c | 26 73 79 73 53 65 72 76 |s ",|&sysServ|
|00002f80| 69 63 65 73 32 61 28 24 | 73 79 73 53 65 72 76 69 |ices2a($|sysServi|
|00002f90| 63 65 73 29 2c 22 5c 6e | 22 3b 0a 20 20 20 20 7d |ces),"\n|";. }|
|00002fa0| 0a 20 20 20 20 70 72 69 | 6e 74 20 22 5c 6e 22 3b |. pri|nt "\n";|
|00002fb0| 0a 7d 0a 0a 73 75 62 20 | 64 75 6d 70 5f 69 6e 74 |.}..sub |dump_int|
|00002fc0| 65 72 66 61 63 65 20 7b | 0a 20 20 6c 6f 63 61 6c |erface {|. local|
|00002fd0| 28 24 68 6f 73 74 29 20 | 3d 20 40 5f 3b 0a 20 20 |($host) |= @_;. |
|00002fe0| 6c 6f 63 61 6c 28 2a 69 | 6e 74 29 3b 0a 0a 20 20 |local(*i|nt);.. |
|00002ff0| 26 67 65 74 5f 74 61 62 | 6c 65 28 24 68 6f 73 74 |&get_tab|le($host|
|00003000| 2c 22 69 6e 74 65 72 66 | 61 63 65 73 22 2c 2a 69 |,"interf|aces",*i|
|00003010| 6e 74 29 3b 0a 0a 20 20 | 24 6e 75 6d 62 65 72 20 |nt);.. |$number |
|00003020| 3d 20 24 69 6e 74 7b 22 | 69 66 4e 75 6d 62 65 72 |= $int{"|ifNumber|
|00003030| 5b 30 5d 22 7d 3b 0a 20 | 20 20 20 70 72 69 6e 74 |[0]"};. | print|
|00003040| 20 22 5c 6e 22 3b 0a 20 | 20 20 20 70 72 69 6e 74 | "\n";. | print|
|00003050| 20 22 48 6f 73 74 3a 20 | 24 68 6f 73 74 5c 6e 44 | "Host: |$host\nD|
|00003060| 61 74 65 3a 20 24 64 61 | 74 65 5c 6e 22 3b 0a 20 |ate: $da|te\n";. |
|00003070| 20 20 20 70 72 69 6e 74 | 20 22 5c 6e 22 3b 0a 20 | print| "\n";. |
|00003080| 20 20 20 70 72 69 6e 74 | 20 22 20 22 2a 33 30 2c | print| " "*30,|
|00003090| 22 49 6e 74 65 72 66 61 | 63 65 20 54 61 62 6c 65 |"Interfa|ce Table|
|000030a0| 5c 6e 22 3b 0a 20 20 20 | 20 70 72 69 6e 74 20 22 |\n";. | print "|
|000030b0| 5c 6e 22 3b 0a 0a 20 20 | 20 20 70 72 69 6e 74 20 |\n";.. | print |
|000030c0| 22 4e 75 6d 62 65 72 20 | 6f 66 20 69 6e 74 65 72 |"Number |of inter|
|000030d0| 66 61 63 65 73 20 3d 20 | 24 6e 75 6d 62 65 72 5c |faces = |$number\|
|000030e0| 6e 22 3b 0a 0a 20 20 66 | 6f 72 20 28 24 69 3d 31 |n";.. f|or ($i=1|
|000030f0| 3b 20 24 69 20 3c 3d 20 | 24 6e 75 6d 62 65 72 3b |; $i <= |$number;|
|00003100| 20 24 69 2b 2b 29 20 7b | 0a 20 20 20 20 70 72 69 | $i++) {|. pri|
|00003110| 6e 74 20 22 5c 6e 22 3b | 0a 20 20 20 70 72 69 6e |nt "\n";|. prin|
|00003120| 74 20 22 2d 22 2a 34 30 | 2c 22 49 6e 74 65 72 66 |t "-"*40|,"Interf|
|00003130| 61 63 65 20 24 69 5c 6e | 22 3b 0a 20 20 20 20 24 |ace $i\n|";. $|
|00003140| 69 66 49 6e 64 65 78 20 | 3d 20 24 69 6e 74 7b 22 |ifIndex |= $int{"|
|00003150| 69 66 49 6e 64 65 78 5b | 24 69 5d 22 7d 3b 0a 20 |ifIndex[|$i]"};. |
|00003160| 20 20 20 24 69 66 44 65 | 73 63 72 20 3d 20 26 68 | $ifDe|scr = &h|
|00003170| 65 78 53 74 72 69 6e 67 | 32 61 28 24 69 6e 74 7b |exString|2a($int{|
|00003180| 22 69 66 44 65 73 63 72 | 5b 24 69 5d 22 7d 29 3b |"ifDescr|[$i]"});|
|00003190| 0a 20 20 20 20 24 69 66 | 54 79 70 65 20 20 3d 20 |. $if|Type = |
|000031a0| 24 69 66 54 79 70 65 32 | 61 7b 24 69 6e 74 7b 22 |$ifType2|a{$int{"|
|000031b0| 69 66 54 79 70 65 5b 24 | 69 5d 22 7d 7d 3b 0a 20 |ifType[$|i]"}};. |
|000031c0| 20 20 20 24 69 66 4d 74 | 75 20 20 20 3d 20 24 69 | $ifMt|u = $i|
|000031d0| 6e 74 7b 22 69 66 4d 74 | 75 5b 24 69 5d 22 7d 3b |nt{"ifMt|u[$i]"};|
|000031e0| 0a 20 20 20 20 24 69 66 | 53 70 65 65 64 20 3d 20 |. $if|Speed = |
|000031f0| 24 69 6e 74 7b 22 69 66 | 53 70 65 65 64 5b 24 69 |$int{"if|Speed[$i|
|00003200| 5d 22 7d 3b 0a 20 20 20 | 20 24 69 66 50 68 79 73 |]"};. | $ifPhys|
|00003210| 41 64 64 72 65 73 73 20 | 3d 20 24 69 6e 74 7b 22 |Address |= $int{"|
|00003220| 69 66 50 68 79 73 41 64 | 64 72 65 73 73 5b 24 69 |ifPhysAd|dress[$i|
|00003230| 5d 22 7d 3b 0a 20 20 20 | 20 24 69 66 41 64 6d 69 |]"};. | $ifAdmi|
|00003240| 6e 53 74 61 74 75 73 20 | 3d 20 24 69 66 41 64 6d |nStatus |= $ifAdm|
|00003250| 69 6e 53 74 61 74 75 73 | 32 61 7b 24 69 6e 74 7b |inStatus|2a{$int{|
|00003260| 22 69 66 41 64 6d 69 6e | 53 74 61 74 75 73 5b 24 |"ifAdmin|Status[$|
|00003270| 69 5d 22 7d 7d 3b 0a 20 | 20 20 20 24 69 66 4f 70 |i]"}};. | $ifOp|
|00003280| 65 72 53 74 61 74 75 73 | 20 20 3d 20 24 69 66 4f |erStatus| = $ifO|
|00003290| 70 65 72 53 74 61 74 75 | 73 32 61 7b 24 69 6e 74 |perStatu|s2a{$int|
|000032a0| 7b 22 69 66 4f 70 65 72 | 53 74 61 74 75 73 5b 24 |{"ifOper|Status[$|
|000032b0| 69 5d 22 7d 7d 3b 0a 20 | 20 20 20 24 69 66 4c 61 |i]"}};. | $ifLa|
|000032c0| 73 74 43 68 61 6e 67 65 | 20 20 3d 20 26 74 69 6d |stChange| = &tim|
|000032d0| 65 54 69 63 6b 73 32 61 | 28 24 69 6e 74 7b 22 69 |eTicks2a|($int{"i|
|000032e0| 66 4c 61 73 74 43 68 61 | 6e 67 65 5b 24 69 5d 22 |fLastCha|nge[$i]"|
|000032f0| 7d 29 3b 0a 20 20 20 20 | 24 69 66 49 6e 4f 63 74 |});. |$ifInOct|
|00003300| 65 74 73 20 3d 20 24 69 | 6e 74 7b 22 69 66 49 6e |ets = $i|nt{"ifIn|
|00003310| 4f 63 74 65 74 73 5b 24 | 69 5d 22 7d 2b 30 3b 0a |Octets[$|i]"}+0;.|
|00003320| 20 20 20 20 24 69 66 49 | 6e 55 63 61 73 74 50 6b | $ifI|nUcastPk|
|00003330| 74 73 20 3d 20 24 69 6e | 74 7b 22 69 66 49 6e 55 |ts = $in|t{"ifInU|
|00003340| 63 61 73 74 50 6b 74 73 | 5b 24 69 5d 22 7d 2b 30 |castPkts|[$i]"}+0|
|00003350| 3b 0a 20 20 20 20 24 69 | 66 49 6e 4e 55 63 61 73 |;. $i|fInNUcas|
|00003360| 74 50 6b 74 73 20 3d 20 | 24 69 6e 74 7b 22 69 66 |tPkts = |$int{"if|
|00003370| 49 6e 4e 55 63 61 73 74 | 50 6b 74 73 5b 24 69 5d |InNUcast|Pkts[$i]|
|00003380| 22 7d 2b 30 3b 0a 20 20 | 20 20 24 69 66 49 6e 44 |"}+0;. | $ifInD|
|00003390| 69 73 63 61 72 64 73 20 | 3d 20 20 24 69 6e 74 7b |iscards |= $int{|
|000033a0| 22 69 66 49 6e 44 69 73 | 63 61 72 64 73 5b 24 69 |"ifInDis|cards[$i|
|000033b0| 5d 22 7d 2b 30 3b 0a 20 | 20 20 20 24 69 66 49 6e |]"}+0;. | $ifIn|
|000033c0| 45 72 72 6f 72 73 20 3d | 20 24 69 6e 74 7b 22 69 |Errors =| $int{"i|
|000033d0| 66 49 6e 45 72 72 6f 72 | 73 5b 24 69 5d 22 7d 2b |fInError|s[$i]"}+|
|000033e0| 30 3b 0a 20 20 20 20 24 | 69 66 49 6e 55 6e 6b 6e |0;. $|ifInUnkn|
|000033f0| 6f 77 6e 50 72 6f 74 6f | 73 20 3d 20 24 69 6e 74 |ownProto|s = $int|
|00003400| 7b 22 69 66 49 6e 55 6e | 6b 6e 6f 77 6e 50 72 6f |{"ifInUn|knownPro|
|00003410| 74 6f 73 5b 24 69 5d 22 | 7d 2b 30 3b 0a 20 20 20 |tos[$i]"|}+0;. |
|00003420| 20 24 69 66 4f 75 74 4f | 63 74 65 74 73 20 3d 20 | $ifOutO|ctets = |
|00003430| 24 69 6e 74 7b 22 69 66 | 4f 75 74 4f 63 74 65 74 |$int{"if|OutOctet|
|00003440| 73 5b 24 69 5d 22 7d 2b | 30 3b 0a 20 20 20 20 24 |s[$i]"}+|0;. $|
|00003450| 69 66 4f 75 74 55 63 61 | 73 74 50 6b 74 73 20 3d |ifOutUca|stPkts =|
|00003460| 20 24 69 6e 74 7b 22 69 | 66 4f 75 74 55 63 61 73 | $int{"i|fOutUcas|
|00003470| 74 50 6b 74 73 5b 24 69 | 5d 22 7d 2b 30 3b 0a 20 |tPkts[$i|]"}+0;. |
|00003480| 20 20 20 24 69 66 4f 75 | 74 4e 55 63 61 73 74 50 | $ifOu|tNUcastP|
|00003490| 6b 74 73 20 3d 24 69 6e | 74 7b 22 69 66 4f 75 74 |kts =$in|t{"ifOut|
|000034a0| 4e 55 63 61 73 74 50 6b | 74 73 5b 24 69 5d 22 7d |NUcastPk|ts[$i]"}|
|000034b0| 2b 30 3b 0a 20 20 20 20 | 24 69 66 4f 75 74 44 69 |+0;. |$ifOutDi|
|000034c0| 73 63 61 72 64 73 20 3d | 20 24 69 6e 74 7b 22 69 |scards =| $int{"i|
|000034d0| 66 4f 75 74 44 69 73 63 | 61 72 64 73 5b 24 69 5d |fOutDisc|ards[$i]|
|000034e0| 22 7d 2b 30 3b 0a 20 20 | 20 20 24 69 66 4f 75 74 |"}+0;. | $ifOut|
|000034f0| 45 72 72 6f 72 73 20 3d | 20 24 69 6e 74 7b 22 69 |Errors =| $int{"i|
|00003500| 66 4f 75 74 45 72 72 6f | 72 73 5b 24 69 5d 22 7d |fOutErro|rs[$i]"}|
|00003510| 2b 30 3b 0a 20 20 20 20 | 24 69 66 4f 75 74 51 6c |+0;. |$ifOutQl|
|00003520| 65 6e 20 3d 20 20 24 69 | 6e 74 7b 22 69 66 4f 75 |en = $i|nt{"ifOu|
|00003530| 74 51 6c 65 6e 5b 24 69 | 5d 22 7d 2b 30 3b 0a 70 |tQlen[$i|]"}+0;.p|
|00003540| 72 69 6e 74 20 22 5c 6e | 22 3b 0a 69 66 20 28 24 |rint "\n|";.if ($|
|00003550| 69 66 44 65 73 63 72 29 | 20 7b 20 20 0a 70 72 69 |ifDescr)| { .pri|
|00003560| 6e 74 66 28 22 44 65 73 | 63 72 69 70 74 69 6f 6e |ntf("Des|cription|
|00003570| 20 20 20 20 20 25 73 20 | 28 25 64 29 5c 6e 22 2c | %s |(%d)\n",|
|00003580| 24 69 66 44 65 73 63 72 | 2c 24 69 66 49 6e 64 65 |$ifDescr|,$ifInde|
|00003590| 78 29 3b 20 0a 7d 0a 65 | 6c 73 65 20 20 20 20 20 |x); .}.e|lse |
|000035a0| 20 20 20 20 20 7b 20 20 | 0a 70 72 69 6e 74 66 28 | { |.printf(|
|000035b0| 22 44 65 73 63 72 69 70 | 74 69 6f 6e 20 20 20 20 |"Descrip|tion |
|000035c0| 20 28 25 64 29 5c 6e 22 | 2c 24 69 66 49 6e 64 65 | (%d)\n"|,$ifInde|
|000035d0| 78 29 3b 20 0a 7d 0a 70 | 72 69 6e 74 66 28 22 41 |x); .}.p|rintf("A|
|000035e0| 64 64 72 65 73 73 20 20 | 20 20 20 20 20 20 20 24 |ddress | $|
|000035f0| 69 66 50 68 79 73 41 64 | 64 72 65 73 73 5c 6e 22 |ifPhysAd|dress\n"|
|00003600| 29 3b 0a 70 72 69 6e 74 | 66 28 22 54 79 70 65 20 |);.print|f("Type |
|00003610| 20 20 20 20 20 20 20 20 | 20 20 20 25 73 5c 6e 22 | | %s\n"|
|00003620| 2c 24 69 66 54 79 70 65 | 29 3b 0a 70 72 69 6e 74 |,$ifType|);.print|
|00003630| 66 28 22 4d 74 75 20 20 | 20 20 20 20 20 20 20 20 |f("Mtu | |
|00003640| 20 20 20 25 73 5c 6e 22 | 2c 24 69 66 4d 74 75 29 | %s\n"|,$ifMtu)|
|00003650| 3b 0a 70 72 69 6e 74 66 | 28 22 53 70 65 65 64 20 |;.printf|("Speed |
|00003660| 20 20 20 20 20 20 20 20 | 20 20 25 73 20 28 25 73 | | %s (%s|
|00003670| 29 5c 6e 22 2c 24 69 66 | 53 70 65 65 64 2c 69 6e |)\n",$if|Speed,in|
|00003680| 74 28 24 69 66 53 70 65 | 65 64 2f 31 30 30 30 30 |t($ifSpe|ed/10000|
|00003690| 30 30 29 2e 22 20 4d 42 | 53 22 29 3b 0a 70 72 69 |00)." MB|S");.pri|
|000036a0| 6e 74 66 28 22 53 74 61 | 74 75 73 20 20 20 20 20 |ntf("Sta|tus |
|000036b0| 20 20 20 20 20 25 73 22 | 2c 24 69 66 4f 70 65 72 | %s"|,$ifOper|
|000036c0| 53 74 61 74 75 73 29 3b | 0a 69 66 20 28 24 69 66 |Status);|.if ($if|
|000036d0| 41 64 6d 69 6e 53 74 61 | 74 75 73 20 6e 65 20 24 |AdminSta|tus ne $|
|000036e0| 69 66 4f 70 65 72 53 74 | 61 74 75 73 29 20 7b 20 |ifOperSt|atus) { |
|000036f0| 0a 20 20 20 20 20 20 70 | 72 69 6e 74 66 28 22 28 |. p|rintf("(|
|00003700| 64 65 73 69 72 65 64 20 | 73 74 61 74 65 3a 20 24 |desired |state: $|
|00003710| 69 66 41 64 6d 69 6e 53 | 74 61 74 75 73 29 22 29 |ifAdminS|tatus)")|
|00003720| 3b 20 0a 0a 7d 0a 69 66 | 20 28 24 69 6e 74 7b 22 |; ..}.if| ($int{"|
|00003730| 69 66 4c 61 73 74 43 68 | 61 6e 67 65 5b 24 69 5d |ifLastCh|ange[$i]|
|00003740| 22 7d 29 20 7b 20 70 72 | 69 6e 74 20 22 28 6c 61 |"}) { pr|int "(la|
|00003750| 73 74 20 63 6f 6e 66 69 | 67 20 63 68 61 6e 67 65 |st confi|g change|
|00003760| 3a 20 24 69 66 4c 61 73 | 74 43 68 61 6e 67 65 29 |: $ifLas|tChange)|
|00003770| 22 3b 7d 0a 70 72 69 6e | 74 66 28 22 5c 6e 22 29 |";}.prin|tf("\n")|
|00003780| 3b 0a 70 72 69 6e 74 66 | 28 22 55 6e 6b 6e 77 6e |;.printf|("Unknwn|
|00003790| 20 50 72 6f 74 6f 20 20 | 20 20 25 73 5c 6e 22 2c | Proto | %s\n",|
|000037a0| 24 69 66 49 6e 55 6e 6b | 6e 6f 77 6e 50 72 6f 74 |$ifInUnk|nownProt|
|000037b0| 6f 73 29 3b 0a 70 72 69 | 6e 74 66 28 22 4f 75 74 |os);.pri|ntf("Out|
|000037c0| 70 75 74 20 51 20 6c 65 | 6e 20 20 20 20 25 73 5c |put Q le|n %s\|
|000037d0| 6e 22 2c 24 69 66 4f 75 | 74 51 6c 65 6e 29 3b 0a |n",$ifOu|tQlen);.|
|000037e0| 0a 0a 70 72 69 6e 74 66 | 28 22 49 6e 70 75 74 5c |..printf|("Input\|
|000037f0| 6e 22 29 3b 0a 70 72 69 | 6e 74 66 28 22 20 20 4f |n");.pri|ntf(" O|
|00003800| 63 74 65 63 74 73 20 20 | 20 20 20 20 20 25 64 5c |ctects | %d\|
|00003810| 6e 22 2c 24 69 66 49 6e | 4f 63 74 65 63 74 73 29 |n",$ifIn|Octects)|
|00003820| 3b 0a 70 72 69 6e 74 66 | 28 22 20 20 75 6e 69 63 |;.printf|(" unic|
|00003830| 61 73 74 20 20 20 20 20 | 20 20 25 64 5c 6e 22 2c |ast | %d\n",|
|00003840| 24 69 66 49 6e 55 63 61 | 73 74 50 6b 74 73 29 3b |$ifInUca|stPkts);|
|00003850| 0a 70 72 69 6e 74 66 28 | 22 20 20 62 72 6f 61 64 |.printf(|" broad|
|00003860| 2f 6d 75 6c 74 69 20 20 | 20 25 64 5c 6e 22 2c 24 |/multi | %d\n",$|
|00003870| 69 66 49 6e 4e 55 63 61 | 73 74 50 6b 74 73 29 3b |ifInNUca|stPkts);|
|00003880| 0a 70 72 69 6e 74 66 28 | 22 20 20 64 69 73 63 61 |.printf(|" disca|
|00003890| 72 64 73 20 20 20 20 20 | 20 25 64 5c 6e 22 2c 24 |rds | %d\n",$|
|000038a0| 69 66 49 6e 44 69 73 63 | 61 72 64 73 29 3b 0a 70 |ifInDisc|ards);.p|
|000038b0| 72 69 6e 74 66 28 22 20 | 20 65 72 72 6f 72 73 20 |rintf(" | errors |
|000038c0| 20 20 20 20 20 20 20 25 | 64 5c 6e 22 2c 24 69 66 | %|d\n",$if|
|000038d0| 49 6e 45 72 72 6f 72 73 | 29 3b 0a 70 72 69 6e 74 |InErrors|);.print|
|000038e0| 66 28 22 4f 75 74 70 75 | 74 5c 6e 22 29 3b 0a 70 |f("Outpu|t\n");.p|
|000038f0| 72 69 6e 74 66 28 22 20 | 20 4f 63 74 65 63 74 73 |rintf(" | Octects|
|00003900| 20 20 20 20 20 20 20 25 | 64 5c 6e 22 2c 24 69 66 | %|d\n",$if|
|00003910| 4f 75 74 4f 63 74 65 74 | 73 29 3b 0a 70 72 69 6e |OutOctet|s);.prin|
|00003920| 74 66 28 22 20 20 75 6e | 69 63 61 73 74 20 20 20 |tf(" un|icast |
|00003930| 20 20 20 20 25 64 5c 6e | 22 2c 24 69 66 4f 75 74 | %d\n|",$ifOut|
|00003940| 55 63 61 73 74 50 6b 74 | 73 29 3b 0a 70 72 69 6e |UcastPkt|s);.prin|
|00003950| 74 66 28 22 20 20 62 72 | 6f 61 64 2f 6d 75 6c 74 |tf(" br|oad/mult|
|00003960| 69 20 20 20 25 64 5c 6e | 22 2c 24 69 66 4f 75 74 |i %d\n|",$ifOut|
|00003970| 4e 55 63 61 73 74 50 6b | 74 73 29 3b 0a 70 72 69 |NUcastPk|ts);.pri|
|00003980| 6e 74 66 28 22 20 20 64 | 69 73 63 61 72 64 73 20 |ntf(" d|iscards |
|00003990| 20 20 20 20 20 25 64 5c | 6e 22 2c 24 69 66 4f 75 | %d\|n",$ifOu|
|000039a0| 74 44 69 73 63 61 72 64 | 73 29 3b 0a 70 72 69 6e |tDiscard|s);.prin|
|000039b0| 74 66 28 22 20 20 65 72 | 72 6f 72 73 20 20 20 20 |tf(" er|rors |
|000039c0| 20 20 20 20 25 64 5c 6e | 22 2c 24 69 66 4f 75 74 | %d\n|",$ifOut|
|000039d0| 45 72 72 6f 72 73 29 3b | 0a 0a 0a 20 20 7d 0a 7d |Errors);|... }.}|
|000039e0| 0a 0a 73 75 62 20 64 75 | 6d 70 5f 61 74 20 7b 0a |..sub du|mp_at {.|
|000039f0| 0a 20 20 6c 6f 63 61 6c | 28 24 68 6f 73 74 29 20 |. local|($host) |
|00003a00| 3d 20 40 5f 3b 0a 20 20 | 6c 6f 63 61 6c 28 2a 61 |= @_;. |local(*a|
|00003a10| 74 29 3b 0a 0a 20 20 26 | 67 65 74 5f 74 61 62 6c |t);.. &|get_tabl|
|00003a20| 65 28 24 68 6f 73 74 2c | 22 61 74 22 2c 2a 61 74 |e($host,|"at",*at|
|00003a30| 29 3b 0a 0a 20 20 20 20 | 70 72 69 6e 74 20 22 5c |);.. |print "\|
|00003a40| 6e 22 3b 0a 20 20 20 20 | 70 72 69 6e 74 20 22 48 |n";. |print "H|
|00003a50| 6f 73 74 3a 20 24 68 6f | 73 74 5c 6e 44 61 74 65 |ost: $ho|st\nDate|
|00003a60| 3a 20 24 64 61 74 65 5c | 6e 22 3b 0a 20 20 20 20 |: $date\|n";. |
|00003a70| 70 72 69 6e 74 20 22 5c | 6e 22 3b 0a 20 20 20 20 |print "\|n";. |
|00003a80| 70 72 69 6e 74 20 22 20 | 20 20 20 20 20 20 41 64 |print " | Ad|
|00003a90| 64 72 65 73 73 20 54 72 | 61 6e 73 6c 61 74 69 6f |dress Tr|anslatio|
|00003aa0| 6e 20 47 72 6f 75 70 5c | 6e 22 3b 0a 20 20 20 20 |n Group\|n";. |
|00003ab0| 70 72 69 6e 74 20 22 5c | 6e 22 3b 0a 0a 20 20 20 |print "\|n";.. |
|00003ac0| 20 70 72 69 6e 74 66 28 | 22 25 38 73 20 25 31 37 | printf(|"%8s %17|
|00003ad0| 73 20 20 20 20 20 20 20 | 25 73 5c 6e 22 2c 22 49 |s |%s\n","I|
|00003ae0| 6e 74 65 72 66 61 63 65 | 22 2c 22 50 68 79 73 69 |nterface|","Physi|
|00003af0| 63 61 6c 20 41 64 64 72 | 22 2c 22 49 50 20 41 64 |cal Addr|","IP Ad|
|00003b00| 64 72 22 29 3b 0a 0a 20 | 20 66 6f 72 65 61 63 68 |dr");.. | foreach|
|00003b10| 20 28 6b 65 79 73 20 25 | 61 74 29 20 7b 0a 0a 20 | (keys %|at) {.. |
|00003b20| 20 20 20 20 20 69 66 20 | 28 2f 5e 61 74 49 66 49 | if |(/^atIfI|
|00003b30| 6e 64 65 78 5c 5b 28 5b | 5e 5d 5d 2a 29 2f 29 20 |ndex\[([|^]]*)/) |
|00003b40| 7b 0a 20 20 20 20 20 20 | 20 20 20 24 5f 20 3d 20 |{. | $_ = |
|00003b50| 24 69 6e 64 65 78 20 3d | 20 24 31 3b 0a 20 20 20 |$index =| $1;. |
|00003b60| 20 20 20 20 20 20 28 24 | 69 66 2c 24 69 70 29 20 | ($|if,$ip) |
|00003b70| 3d 20 2f 28 5c 64 2b 29 | 5c 2e 5c 64 2b 5c 2e 28 |= /(\d+)|\.\d+\.(|
|00003b80| 2e 2a 29 2f 3b 0a 20 20 | 20 20 20 20 20 20 20 70 |.*)/;. | p|
|00003b90| 72 69 6e 74 66 28 22 20 | 20 20 25 32 64 20 20 20 |rintf(" | %2d |
|00003ba0| 20 20 20 20 25 73 20 20 | 20 20 25 73 5c 6e 22 2c | %s | %s\n",|
|00003bb0| 24 69 66 2c 24 61 74 7b | 22 61 74 50 68 79 73 41 |$if,$at{|"atPhysA|
|00003bc0| 64 64 72 65 73 73 5b 24 | 69 6e 64 65 78 5d 22 7d |ddress[$|index]"}|
|00003bd0| 2c 24 69 70 29 3b 0a 20 | 20 20 20 20 20 7d 0a 20 |,$ip);. | }. |
|00003be0| 20 7d 0a 20 20 20 20 70 | 72 69 6e 74 20 22 5c 6e | }. p|rint "\n|
|00003bf0| 22 3b 0a 7d 0a 0a 0a 73 | 75 62 20 64 75 6d 70 5f |";.}...s|ub dump_|
|00003c00| 69 70 20 7b 0a 0a 20 20 | 6c 6f 63 61 6c 28 24 68 |ip {.. |local($h|
|00003c10| 6f 73 74 29 20 3d 20 40 | 5f 3b 0a 20 20 6c 6f 63 |ost) = @|_;. loc|
|00003c20| 61 6c 28 2a 69 70 29 3b | 0a 0a 20 20 26 67 65 74 |al(*ip);|.. &get|
|00003c30| 5f 74 61 62 6c 65 28 24 | 68 6f 73 74 2c 22 69 70 |_table($|host,"ip|
|00003c40| 22 2c 2a 69 70 29 3b 0a | 0a 20 20 20 20 70 72 69 |",*ip);.|. pri|
|00003c50| 6e 74 20 22 5c 6e 22 3b | 0a 20 20 20 20 70 72 69 |nt "\n";|. pri|
|00003c60| 6e 74 20 22 48 6f 73 74 | 3a 20 24 68 6f 73 74 5c |nt "Host|: $host\|
|00003c70| 6e 44 61 74 65 3a 20 24 | 64 61 74 65 5c 6e 22 3b |nDate: $|date\n";|
|00003c80| 0a 20 20 20 20 70 72 69 | 6e 74 20 22 5c 6e 22 3b |. pri|nt "\n";|
|00003c90| 0a 20 20 20 20 70 72 69 | 6e 74 20 22 20 22 2a 31 |. pri|nt " "*1|
|00003ca0| 30 2c 22 49 50 20 47 72 | 6f 75 70 5c 6e 22 3b 0a |0,"IP Gr|oup\n";.|
|00003cb0| 0a 20 20 70 72 69 6e 74 | 20 22 5c 6e 22 3b 0a 20 |. print| "\n";. |
|00003cc0| 20 70 72 69 6e 74 20 22 | 46 6f 72 77 61 72 64 69 | print "|Forwardi|
|00003cd0| 6e 67 20 20 20 20 20 20 | 20 20 20 20 22 2c 24 69 |ng | ",$i|
|00003ce0| 70 46 6f 72 77 61 72 64 | 69 6e 67 32 61 7b 24 69 |pForward|ing2a{$i|
|00003cf0| 70 7b 22 69 70 46 6f 72 | 77 61 72 64 69 6e 67 5b |p{"ipFor|warding[|
|00003d00| 30 5d 22 7d 7d 2c 22 5c | 6e 22 3b 0a 20 20 70 72 |0]"}},"\|n";. pr|
|00003d10| 69 6e 74 20 22 44 65 66 | 61 75 6c 74 20 54 54 4c |int "Def|ault TTL|
|00003d20| 20 20 20 20 20 20 20 20 | 20 22 2c 24 69 70 7b 22 | | ",$ip{"|
|00003d30| 69 70 44 65 66 61 75 6c | 74 54 54 4c 5b 30 5d 22 |ipDefaul|tTTL[0]"|
|00003d40| 7d 2b 30 2c 22 5c 6e 22 | 3b 0a 20 20 70 72 69 6e |}+0,"\n"|;. prin|
|00003d50| 74 20 22 49 6e 70 75 74 | 5c 6e 22 3b 0a 20 20 70 |t "Input|\n";. p|
|00003d60| 72 69 6e 74 20 22 20 20 | 44 61 74 61 67 72 61 6d |rint " |Datagram|
|00003d70| 73 20 20 20 20 20 20 20 | 20 20 22 2c 24 69 70 7b |s | ",$ip{|
|00003d80| 22 69 70 49 6e 52 65 63 | 65 69 76 65 73 5b 30 5d |"ipInRec|eives[0]|
|00003d90| 22 7d 2b 30 2c 22 5c 6e | 22 3b 0a 20 20 70 72 69 |"}+0,"\n|";. pri|
|00003da0| 6e 74 20 22 20 20 48 61 | 72 64 77 61 72 65 20 45 |nt " Ha|rdware E|
|00003db0| 72 72 20 20 20 20 20 20 | 22 2c 24 69 70 7b 22 69 |rr |",$ip{"i|
|00003dc0| 70 49 6e 48 64 72 45 72 | 72 6f 72 73 5b 30 5d 22 |pInHdrEr|rors[0]"|
|00003dd0| 7d 2b 30 2c 22 5c 6e 22 | 3b 0a 20 20 70 72 69 6e |}+0,"\n"|;. prin|
|00003de0| 74 20 22 20 20 41 64 64 | 72 65 73 73 20 45 72 72 |t " Add|ress Err|
|00003df0| 20 20 20 20 20 20 20 22 | 2c 24 69 70 7b 22 69 70 | "|,$ip{"ip|
|00003e00| 49 6e 41 64 64 72 45 72 | 72 6f 72 73 5b 30 5d 22 |InAddrEr|rors[0]"|
|00003e10| 7d 2b 30 2c 22 5c 6e 22 | 3b 0a 20 20 70 72 69 6e |}+0,"\n"|;. prin|
|00003e20| 74 20 22 20 20 55 6e 6b | 6e 6f 77 6e 20 50 72 6f |t " Unk|nown Pro|
|00003e30| 74 6f 20 20 20 20 20 22 | 2c 24 69 70 7b 22 69 70 |to "|,$ip{"ip|
|00003e40| 49 6e 55 6e 6b 6e 6f 77 | 6e 50 72 6f 74 6f 73 5b |InUnknow|nProtos[|
|00003e50| 30 5d 22 7d 2b 30 2c 22 | 5c 6e 22 3b 0a 20 20 70 |0]"}+0,"|\n";. p|
|00003e60| 72 69 6e 74 20 22 20 20 | 44 69 73 63 61 72 64 73 |rint " |Discards|
|00003e70| 20 20 20 20 20 20 20 20 | 20 20 22 2c 24 69 70 7b | | ",$ip{|
|00003e80| 22 69 70 49 6e 44 69 73 | 63 61 72 64 73 5b 30 5d |"ipInDis|cards[0]|
|00003e90| 22 7d 2b 30 2c 22 5c 6e | 22 3b 0a 20 20 70 72 69 |"}+0,"\n|";. pri|
|00003ea0| 6e 74 20 22 20 20 44 65 | 6c 69 76 65 72 73 20 20 |nt " De|livers |
|00003eb0| 20 20 20 20 20 20 20 20 | 22 2c 24 69 70 7b 22 69 | |",$ip{"i|
|00003ec0| 70 49 6e 44 65 6c 69 76 | 65 72 73 5b 30 5d 22 7d |pInDeliv|ers[0]"}|
|00003ed0| 2b 30 2c 22 5c 6e 22 3b | 0a 20 20 70 72 69 6e 74 |+0,"\n";|. print|
|00003ee0| 20 22 4f 75 74 70 75 74 | 5c 6e 22 3b 0a 20 20 70 | "Output|\n";. p|
|00003ef0| 72 69 6e 74 20 22 20 20 | 44 61 74 61 67 72 61 6d |rint " |Datagram|
|00003f00| 73 20 20 20 20 20 20 20 | 20 20 22 2c 24 69 70 7b |s | ",$ip{|
|00003f10| 22 69 70 4f 75 74 52 65 | 63 65 69 76 65 73 5b 30 |"ipOutRe|ceives[0|
|00003f20| 5d 22 7d 2b 30 2c 22 5c | 6e 22 3b 0a 20 20 70 72 |]"}+0,"\|n";. pr|
|00003f30| 69 6e 74 20 22 20 20 44 | 69 73 63 61 72 64 73 20 |int " D|iscards |
|00003f40| 20 20 20 20 20 20 20 20 | 20 22 2c 24 69 70 7b 22 | | ",$ip{"|
|00003f50| 69 70 4f 75 74 44 69 73 | 63 61 72 64 73 5b 30 5d |ipOutDis|cards[0]|
|00003f60| 22 7d 2b 30 2c 22 5c 6e | 22 3b 0a 20 20 70 72 69 |"}+0,"\n|";. pri|
|00003f70| 6e 74 20 22 20 20 4e 6f | 20 52 6f 75 74 65 73 20 |nt " No| Routes |
|00003f80| 20 20 20 20 20 20 20 20 | 22 2c 24 69 70 7b 22 69 | |",$ip{"i|
|00003f90| 70 4f 75 74 4e 6f 52 6f | 75 74 65 73 5b 30 5d 22 |pOutNoRo|utes[0]"|
|00003fa0| 7d 2b 30 2c 22 5c 6e 22 | 3b 0a 20 20 70 72 69 6e |}+0,"\n"|;. prin|
|00003fb0| 74 20 22 52 65 61 73 73 | 65 6d 62 6c 79 5c 6e 22 |t "Reass|embly\n"|
|00003fc0| 3b 0a 20 20 70 72 69 6e | 74 20 22 20 20 54 69 6d |;. prin|t " Tim|
|00003fd0| 65 6f 75 74 20 20 20 20 | 20 20 20 20 20 20 20 22 |eout | "|
|00003fe0| 2c 24 69 70 7b 22 69 70 | 52 65 61 73 6d 54 69 6d |,$ip{"ip|ReasmTim|
|00003ff0| 65 6f 75 74 5b 30 5d 22 | 7d 2b 30 2c 22 5c 6e 22 |eout[0]"|}+0,"\n"|
|00004000| 3b 0a 20 20 70 72 69 6e | 74 20 22 20 20 52 65 71 |;. prin|t " Req|
|00004010| 75 65 73 74 73 20 20 20 | 20 20 20 20 20 20 20 22 |uests | "|
|00004020| 2c 24 69 70 7b 22 69 70 | 52 65 61 73 6d 52 65 71 |,$ip{"ip|ReasmReq|
|00004030| 64 73 5b 30 5d 22 7d 2b | 30 2c 22 5c 6e 22 3b 0a |ds[0]"}+|0,"\n";.|
|00004040| 20 20 70 72 69 6e 74 20 | 22 20 20 4f 4b 20 20 20 | print |" OK |
|00004050| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 22 2c 24 | | ",$|
|00004060| 69 70 7b 22 69 70 52 65 | 61 73 6d 4f 4b 73 5b 30 |ip{"ipRe|asmOKs[0|
|00004070| 5d 22 7d 2b 30 2c 22 5c | 6e 22 3b 0a 20 20 70 72 |]"}+0,"\|n";. pr|
|00004080| 69 6e 74 20 22 20 20 46 | 61 69 6c 20 20 20 20 20 |int " F|ail |
|00004090| 20 20 20 20 20 20 20 20 | 20 22 2c 24 69 70 7b 22 | | ",$ip{"|
|000040a0| 69 70 52 65 61 73 6d 46 | 61 69 6c 73 5b 30 5d 22 |ipReasmF|ails[0]"|
|000040b0| 7d 2b 30 2c 22 5c 6e 22 | 3b 0a 20 20 70 72 69 6e |}+0,"\n"|;. prin|
|000040c0| 74 20 22 46 72 61 67 73 | 5c 6e 22 3b 0a 20 20 70 |t "Frags|\n";. p|
|000040d0| 72 69 6e 74 20 22 20 20 | 4f 4b 20 20 20 20 20 20 |rint " |OK |
|000040e0| 20 20 20 20 20 20 20 20 | 20 20 22 2c 24 69 70 7b | | ",$ip{|
|000040f0| 22 69 70 46 72 61 67 4f | 4b 73 5b 30 5d 22 7d 2b |"ipFragO|Ks[0]"}+|
|00004100| 30 2c 22 5c 6e 22 3b 0a | 20 20 70 72 69 6e 74 20 |0,"\n";.| print |
|00004110| 22 20 20 46 61 69 6c 20 | 20 20 20 20 20 20 20 20 |" Fail | |
|00004120| 20 20 20 20 20 22 2c 24 | 69 70 7b 22 69 70 46 72 | ",$|ip{"ipFr|
|00004130| 61 67 46 61 69 6c 73 5b | 30 5d 22 7d 2b 30 2c 22 |agFails[|0]"}+0,"|
|00004140| 5c 6e 22 3b 0a 20 20 70 | 72 69 6e 74 20 22 20 20 |\n";. p|rint " |
|00004150| 43 72 65 61 74 65 64 20 | 20 20 20 20 20 20 20 20 |Created | |
|00004160| 20 20 22 2c 24 69 70 7b | 22 69 70 46 72 61 67 43 | ",$ip{|"ipFragC|
|00004170| 72 65 61 74 65 73 5b 30 | 5d 22 7d 2b 30 2c 22 5c |reates[0|]"}+0,"\|
|00004180| 6e 22 3b 0a 20 20 70 72 | 69 6e 74 20 22 46 6f 72 |n";. pr|int "For|
|00004190| 77 61 72 64 65 64 20 44 | 61 74 61 67 72 61 6d 73 |warded D|atagrams|
|000041a0| 20 22 2c 24 69 70 7b 22 | 69 70 46 6f 72 77 44 61 | ",$ip{"|ipForwDa|
|000041b0| 74 61 67 72 61 6d 73 5b | 30 5d 22 7d 2b 30 2c 22 |tagrams[|0]"}+0,"|
|000041c0| 5c 6e 22 3b 0a 0a 20 20 | 24 64 6f 6e 65 3d 30 3b |\n";.. |$done=0;|
|000041d0| 0a 20 20 66 6f 72 65 61 | 63 68 20 28 6b 65 79 73 |. forea|ch (keys|
|000041e0| 20 25 69 70 29 20 7b 0a | 0a 20 20 20 20 20 20 69 | %ip) {.|. i|
|000041f0| 66 20 28 2f 5e 69 70 41 | 64 45 6e 74 41 64 64 72 |f (/^ipA|dEntAddr|
|00004200| 5c 5b 28 5b 5e 5d 5d 2a | 29 2f 29 20 7b 0a 20 20 |\[([^]]*|)/) {. |
|00004210| 20 20 69 66 20 28 21 24 | 64 6f 6e 65 29 20 7b 0a | if (!$|done) {.|
|00004220| 20 20 20 20 70 72 69 6e | 74 20 22 5c 6e 22 3b 0a | prin|t "\n";.|
|00004230| 20 20 20 20 20 20 20 20 | 20 70 72 69 6e 74 20 22 | | print "|
|00004240| 20 22 2a 32 30 2c 22 49 | 50 20 49 6e 74 65 72 66 | "*20,"I|P Interf|
|00004250| 61 63 65 20 41 64 64 72 | 65 73 73 20 54 61 62 6c |ace Addr|ess Tabl|
|00004260| 65 5c 6e 22 3b 0a 20 20 | 20 20 20 20 20 20 20 70 |e\n";. | p|
|00004270| 72 69 6e 74 66 28 22 25 | 73 20 20 25 2d 31 35 73 |rintf("%|s %-15s|
|00004280| 20 25 2d 31 35 73 20 25 | 2d 31 35 73 20 20 25 73 | %-15s %|-15s %s|
|00004290| 5c 6e 22 2c 0a 20 20 20 | 20 20 20 20 20 20 22 49 |\n",. | "I|
|000042a0| 6e 74 65 72 66 61 63 65 | 22 2c 22 49 50 20 61 64 |nterface|","IP ad|
|000042b0| 64 72 65 73 73 22 2c 22 | 4e 65 74 20 4d 61 73 6b |dress","|Net Mask|
|000042c0| 22 2c 22 42 72 6f 61 64 | 63 61 73 74 22 2c 22 52 |","Broad|cast","R|
|000042d0| 65 61 73 6d 20 4d 61 78 | 20 28 6d 69 62 20 49 49 |easm Max| (mib II|
|000042e0| 29 22 29 3b 0a 20 20 20 | 20 20 20 20 20 20 24 64 |)");. | $d|
|000042f0| 6f 6e 65 3d 31 3b 0a 20 | 20 20 20 7d 0a 20 20 20 |one=1;. | }. |
|00004300| 20 20 20 20 20 20 24 5f | 20 3d 20 24 31 3b 0a 20 | $_| = $1;. |
|00004310| 20 20 20 20 20 20 20 20 | 70 72 69 6e 74 66 28 22 | |printf("|
|00004320| 20 20 25 32 64 20 20 20 | 20 20 20 20 25 2d 31 35 | %2d | %-15|
|00004330| 73 20 25 2d 31 35 73 20 | 25 2d 31 35 73 20 20 25 |s %-15s |%-15s %|
|00004340| 73 5c 6e 22 2c 0a 09 09 | 24 69 70 7b 22 69 70 41 |s\n",...|$ip{"ipA|
|00004350| 64 45 6e 74 49 66 49 6e | 64 65 78 5b 24 5f 5d 22 |dEntIfIn|dex[$_]"|
|00004360| 7d 2c 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |},. | |
|00004370| 20 20 20 24 5f 2c 0a 09 | 09 24 69 70 7b 22 69 70 | $_,..|.$ip{"ip|
|00004380| 41 64 45 6e 74 4e 65 74 | 4d 61 73 6b 5b 24 5f 5d |AdEntNet|Mask[$_]|
|00004390| 22 7d 2c 0a 09 09 24 69 | 70 7b 22 69 70 41 64 45 |"},...$i|p{"ipAdE|
|000043a0| 6e 74 42 63 61 73 74 41 | 64 64 72 5b 24 5f 5d 22 |ntBcastA|ddr[$_]"|
|000043b0| 7d 2c 0a 09 09 24 69 70 | 7b 22 69 70 41 64 45 6e |},...$ip|{"ipAdEn|
|000043c0| 74 52 65 61 73 6d 4d 61 | 78 53 69 7a 65 5b 24 5f |tReasmMa|xSize[$_|
|000043d0| 5d 22 7d 29 3b 0a 20 20 | 20 20 20 20 7d 0a 20 20 |]"});. | }. |
|000043e0| 7d 0a 0a 20 20 24 64 6f | 6e 65 3d 30 3b 0a 20 20 |}.. $do|ne=0;. |
|000043f0| 66 6f 72 65 61 63 68 20 | 28 6b 65 79 73 20 25 69 |foreach |(keys %i|
|00004400| 70 29 20 7b 0a 0a 20 20 | 20 20 20 20 69 66 20 28 |p) {.. | if (|
|00004410| 2f 5e 69 70 52 6f 75 74 | 65 44 65 73 74 5c 5b 28 |/^ipRout|eDest\[(|
|00004420| 5b 5e 5d 5d 2a 29 2f 29 | 20 7b 0a 20 20 20 20 69 |[^]]*)/)| {. i|
|00004430| 66 20 28 21 24 64 6f 6e | 65 29 20 7b 0a 20 20 20 |f (!$don|e) {. |
|00004440| 20 70 72 69 6e 74 20 22 | 5c 6e 22 3b 0a 20 20 20 | print "|\n";. |
|00004450| 20 20 20 20 20 20 70 72 | 69 6e 74 20 22 20 22 2a | pr|int " "*|
|00004460| 32 35 2c 22 52 6f 75 74 | 69 6e 67 20 54 61 62 6c |25,"Rout|ing Tabl|
|00004470| 65 5c 6e 22 3b 0a 0a 20 | 20 20 20 20 20 20 20 20 |e\n";.. | |
|00004480| 70 72 69 6e 74 66 28 22 | 25 2d 31 35 73 20 25 37 |printf("|%-15s %7|
|00004490| 73 20 20 25 2d 31 35 73 | 20 25 2d 37 73 20 20 25 |s %-15s| %-7s %|
|000044a0| 73 5c 6e 22 2c 22 44 65 | 73 74 69 6e 61 74 69 6f |s\n","De|stinatio|
|000044b0| 6e 22 2c 22 49 6e 74 65 | 72 66 61 63 65 22 2c 22 |n","Inte|rface","|
|000044c0| 4e 65 78 74 20 48 6f 70 | 22 2c 22 54 79 70 65 22 |Next Hop|","Type"|
|000044d0| 2c 22 4d 61 73 6b 20 28 | 6d 69 62 20 49 49 29 22 |,"Mask (|mib II)"|
|000044e0| 29 3b 0a 20 20 20 20 20 | 20 20 20 20 24 64 6f 6e |);. | $don|
|000044f0| 65 3d 31 3b 0a 20 20 20 | 20 7d 0a 20 20 20 20 20 |e=1;. | }. |
|00004500| 20 20 20 20 24 5f 20 3d | 20 24 31 3b 0a 20 20 20 | $_ =| $1;. |
|00004510| 20 20 20 20 20 20 70 72 | 69 6e 74 66 28 22 25 2d | pr|intf("%-|
|00004520| 31 35 73 20 20 20 20 25 | 32 64 20 20 20 20 20 20 |15s %|2d |
|00004530| 25 2d 31 35 73 20 25 2d | 37 73 20 20 25 73 5c 6e |%-15s %-|7s %s\n|
|00004540| 22 2c 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |",. | |
|00004550| 20 20 20 24 5f 2c 0a 09 | 09 24 69 70 7b 22 69 70 | $_,..|.$ip{"ip|
|00004560| 52 6f 75 74 65 49 66 49 | 6e 64 65 78 5b 24 5f 5d |RouteIfI|ndex[$_]|
|00004570| 22 7d 2c 0a 09 09 24 69 | 70 7b 22 69 70 52 6f 75 |"},...$i|p{"ipRou|
|00004580| 74 65 4e 65 78 74 48 6f | 70 5b 24 5f 5d 22 7d 2c |teNextHo|p[$_]"},|
|00004590| 0a 09 09 24 69 66 52 6f | 75 74 65 54 79 70 65 32 |...$ifRo|uteType2|
|000045a0| 61 7b 24 69 70 7b 22 69 | 70 52 6f 75 74 65 54 79 |a{$ip{"i|pRouteTy|
|000045b0| 70 65 5b 24 5f 5d 22 7d | 7d 2c 0a 09 09 24 69 70 |pe[$_]"}|},...$ip|
|000045c0| 7b 22 69 70 52 6f 75 74 | 65 4d 61 73 6b 5b 24 5f |{"ipRout|eMask[$_|
|000045d0| 5d 22 7d 29 3b 0a 20 20 | 20 20 20 20 7d 0a 20 20 |]"});. | }. |
|000045e0| 7d 0a 0a 24 64 6f 6e 65 | 3d 30 3b 0a 20 20 66 6f |}..$done|=0;. fo|
|000045f0| 72 65 61 63 68 20 28 6b | 65 79 73 20 25 69 70 29 |reach (k|eys %ip)|
|00004600| 20 7b 0a 20 20 20 20 20 | 20 69 66 20 28 2f 5e 69 | {. | if (/^i|
|00004610| 70 4e 65 74 54 6f 4d 65 | 64 69 61 49 66 49 6e 64 |pNetToMe|diaIfInd|
|00004620| 65 78 5c 5b 28 5b 5e 5d | 5d 2a 29 2f 29 20 7b 0a |ex\[([^]|]*)/) {.|
|00004630| 69 66 20 28 21 24 64 6f | 6e 65 29 20 7b 0a 20 20 |if (!$do|ne) {. |
|00004640| 20 20 20 20 20 20 20 70 | 72 69 6e 74 20 22 5c 6e | p|rint "\n|
|00004650| 22 3b 0a 20 20 20 20 20 | 20 20 20 20 70 72 69 6e |";. | prin|
|00004660| 74 20 22 20 22 2a 31 35 | 2c 22 4e 65 74 20 74 6f |t " "*15|,"Net to|
|00004670| 20 4d 65 64 69 61 20 54 | 61 62 6c 65 20 28 41 52 | Media T|able (AR|
|00004680| 50 20 63 61 63 68 65 29 | 5c 6e 22 3b 0a 20 20 20 |P cache)|\n";. |
|00004690| 20 20 20 20 20 20 70 72 | 69 6e 74 66 28 22 20 25 | pr|intf(" %|
|000046a0| 73 20 20 20 25 2d 31 37 | 73 20 20 20 20 25 2d 31 |s %-17|s %-1|
|000046b0| 35 73 20 20 25 73 5c 6e | 22 2c 0a 20 20 20 20 20 |5s %s\n|",. |
|000046c0| 20 20 20 20 20 20 22 49 | 6e 74 65 72 66 61 63 65 | "I|nterface|
|000046d0| 22 2c 22 50 68 79 73 69 | 63 61 6c 20 41 64 64 72 |","Physi|cal Addr|
|000046e0| 65 73 73 22 2c 22 49 50 | 20 41 64 64 72 65 73 73 |ess","IP| Address|
|000046f0| 22 2c 22 54 79 70 65 22 | 29 3b 0a 20 20 20 24 64 |","Type"|);. $d|
|00004700| 6f 6e 65 3d 31 3b 0a 7d | 0a 20 20 20 20 20 20 20 |one=1;.}|. |
|00004710| 20 20 24 69 6e 64 65 78 | 20 3d 20 24 5f 20 3d 20 | $index| = $_ = |
|00004720| 24 31 3b 0a 20 20 20 20 | 20 20 20 20 20 28 24 69 |$1;. | ($i|
|00004730| 66 2c 24 69 70 29 20 3d | 20 2f 28 5c 64 2b 29 5c |f,$ip) =| /(\d+)\|
|00004740| 2e 28 2e 2a 29 2f 3b 0a | 20 20 20 20 20 20 20 20 |.(.*)/;.| |
|00004750| 20 70 72 69 6e 74 66 28 | 22 20 20 20 25 32 64 20 | printf(|" %2d |
|00004760| 20 20 20 20 20 20 20 25 | 2d 31 37 73 20 20 20 20 | %|-17s |
|00004770| 25 2d 31 35 73 20 20 25 | 73 5c 6e 22 2c 0a 20 20 |%-15s %|s\n",. |
|00004780| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 24 69 | | $i|
|00004790| 66 2c 0a 09 09 24 69 70 | 7b 22 69 70 4e 65 74 54 |f,...$ip|{"ipNetT|
|000047a0| 6f 4d 65 64 69 61 50 68 | 79 73 41 64 64 72 65 73 |oMediaPh|ysAddres|
|000047b0| 73 5b 24 69 6e 64 65 78 | 5d 22 7d 2c 0a 20 20 20 |s[$index|]"},. |
|000047c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 24 69 70 | | $ip|
|000047d0| 2c 0a 09 09 24 69 70 4e | 65 74 54 6f 4d 65 64 69 |,...$ipN|etToMedi|
|000047e0| 61 54 79 70 65 32 61 7b | 24 69 70 7b 22 69 70 4e |aType2a{|$ip{"ipN|
|000047f0| 65 74 54 6f 4d 65 64 69 | 61 54 79 70 65 5b 24 69 |etToMedi|aType[$i|
|00004800| 6e 64 65 78 5d 22 7d 7d | 29 3b 0a 20 20 20 20 20 |ndex]"}}|);. |
|00004810| 20 7d 0a 20 20 7d 0a 20 | 20 20 20 70 72 69 6e 74 | }. }. | print|
|00004820| 20 22 5c 6e 22 3b 0a 0a | 7d 0a 0a 0a 73 75 62 20 | "\n";..|}...sub |
|00004830| 64 75 6d 70 5f 74 63 70 | 20 7b 0a 0a 20 20 6c 6f |dump_tcp| {.. lo|
|00004840| 63 61 6c 28 24 68 6f 73 | 74 29 20 3d 20 40 5f 3b |cal($hos|t) = @_;|
|00004850| 0a 20 20 6c 6f 63 61 6c | 28 2a 74 63 70 29 3b 0a |. local|(*tcp);.|
|00004860| 0a 20 20 26 67 65 74 5f | 74 61 62 6c 65 28 24 68 |. &get_|table($h|
|00004870| 6f 73 74 2c 22 74 63 70 | 22 2c 2a 74 63 70 29 3b |ost,"tcp|",*tcp);|
|00004880| 0a 0a 20 20 20 20 70 72 | 69 6e 74 20 22 5c 6e 22 |.. pr|int "\n"|
|00004890| 3b 0a 20 20 20 20 70 72 | 69 6e 74 20 22 48 6f 73 |;. pr|int "Hos|
|000048a0| 74 3a 20 24 68 6f 73 74 | 5c 6e 44 61 74 65 3a 20 |t: $host|\nDate: |
|000048b0| 24 64 61 74 65 5c 6e 22 | 3b 0a 20 20 20 20 70 72 |$date\n"|;. pr|
|000048c0| 69 6e 74 20 22 5c 6e 22 | 3b 0a 20 20 20 20 70 72 |int "\n"|;. pr|
|000048d0| 69 6e 74 20 22 20 20 20 | 20 20 20 20 54 43 50 20 |int " | TCP |
|000048e0| 47 72 6f 75 70 5c 6e 22 | 3b 0a 20 20 20 20 70 72 |Group\n"|;. pr|
|000048f0| 69 6e 74 20 22 5c 6e 22 | 3b 0a 70 72 69 6e 74 20 |int "\n"|;.print |
|00004900| 22 52 65 74 72 61 6e 73 | 20 41 6c 67 6f 72 69 74 |"Retrans| Algorit|
|00004910| 68 6d 20 20 20 20 22 2c | 24 74 63 70 52 74 6f 41 |hm ",|$tcpRtoA|
|00004920| 6c 67 6f 72 69 74 68 6d | 32 61 7b 24 74 63 70 7b |lgorithm|2a{$tcp{|
|00004930| 22 74 63 70 52 74 6f 41 | 6c 67 6f 72 69 74 68 6d |"tcpRtoA|lgorithm|
|00004940| 5b 30 5d 22 7d 7d 2c 22 | 5c 6e 22 3b 0a 70 72 69 |[0]"}},"|\n";.pri|
|00004950| 6e 74 20 22 52 65 74 72 | 61 6e 73 20 4d 69 6e 20 |nt "Retr|ans Min |
|00004960| 54 69 6d 65 6f 75 74 20 | 20 22 2c 24 74 63 70 7b |Timeout | ",$tcp{|
|00004970| 22 74 63 70 52 74 6f 4d | 69 6e 5b 30 5d 22 7d 2c |"tcpRtoM|in[0]"},|
|00004980| 22 5c 6e 22 3b 0a 70 72 | 69 6e 74 20 22 52 65 74 |"\n";.pr|int "Ret|
|00004990| 72 61 6e 73 20 4d 61 78 | 20 54 69 6d 65 6f 75 74 |rans Max| Timeout|
|000049a0| 20 20 22 2c 24 74 63 70 | 7b 22 74 63 70 52 74 6f | ",$tcp|{"tcpRto|
|000049b0| 4d 61 78 5b 30 5d 22 7d | 2c 22 5c 6e 22 3b 0a 70 |Max[0]"}|,"\n";.p|
|000049c0| 72 69 6e 74 20 22 4d 61 | 78 20 43 6f 6e 6e 65 63 |rint "Ma|x Connec|
|000049d0| 74 69 6f 6e 73 20 20 20 | 20 20 20 22 2c 24 74 63 |tions | ",$tc|
|000049e0| 70 7b 22 74 63 70 4d 61 | 78 43 6f 6e 6e 5b 30 5d |p{"tcpMa|xConn[0]|
|000049f0| 22 7d 2c 22 5c 6e 22 3b | 0a 70 72 69 6e 74 20 22 |"},"\n";|.print "|
|00004a00| 41 63 74 69 76 65 20 4f | 70 65 6e 73 20 20 20 20 |Active O|pens |
|00004a10| 20 20 20 20 20 22 2c 24 | 74 63 70 7b 22 74 63 70 | ",$|tcp{"tcp|
|00004a20| 41 63 74 69 76 65 4f 70 | 65 6e 73 5b 30 5d 22 7d |ActiveOp|ens[0]"}|
|00004a30| 2c 22 5c 6e 22 3b 0a 70 | 72 69 6e 74 20 22 50 61 |,"\n";.p|rint "Pa|
|00004a40| 73 73 69 76 65 20 4f 70 | 65 6e 73 20 20 20 20 20 |ssive Op|ens |
|00004a50| 20 20 20 22 2c 24 74 63 | 70 7b 22 74 63 70 50 61 | ",$tc|p{"tcpPa|
|00004a60| 73 73 69 76 65 4f 70 65 | 6e 73 5b 30 5d 22 7d 2c |ssiveOpe|ns[0]"},|
|00004a70| 22 5c 6e 22 3b 0a 70 72 | 69 6e 74 20 22 41 74 74 |"\n";.pr|int "Att|
|00004a80| 65 6d 70 74 20 46 61 69 | 6c 73 20 20 20 20 20 20 |empt Fai|ls |
|00004a90| 20 20 22 2c 24 74 63 70 | 7b 22 74 63 70 41 74 74 | ",$tcp|{"tcpAtt|
|00004aa0| 65 6d 70 74 46 61 69 6c | 73 5b 30 5d 22 7d 2c 22 |emptFail|s[0]"},"|
|00004ab0| 5c 6e 22 3b 0a 70 72 69 | 6e 74 20 22 43 6f 6e 6e |\n";.pri|nt "Conn|
|00004ac0| 65 63 74 69 6f 6e 20 52 | 65 73 65 74 73 20 20 20 |ection R|esets |
|00004ad0| 20 22 2c 24 74 63 70 7b | 22 74 63 70 45 73 74 61 | ",$tcp{|"tcpEsta|
|00004ae0| 62 52 65 73 65 74 73 5b | 30 5d 22 7d 2c 22 5c 6e |bResets[|0]"},"\n|
|00004af0| 22 3b 0a 70 72 69 6e 74 | 20 22 43 75 72 72 65 6e |";.print| "Curren|
|00004b00| 74 20 43 6f 6e 6e 65 63 | 74 69 6f 6e 73 20 20 22 |t Connec|tions "|
|00004b10| 2c 24 74 63 70 7b 22 74 | 63 70 43 75 72 72 45 73 |,$tcp{"t|cpCurrEs|
|00004b20| 74 61 62 5b 30 5d 22 7d | 2c 22 5c 6e 22 3b 0a 70 |tab[0]"}|,"\n";.p|
|00004b30| 72 69 6e 74 20 22 49 6e | 70 75 74 20 53 65 67 6d |rint "In|put Segm|
|00004b40| 65 6e 74 73 20 20 20 20 | 20 20 20 22 2c 24 74 63 |ents | ",$tc|
|00004b50| 70 7b 22 74 63 70 49 6e | 53 65 67 73 5b 30 5d 22 |p{"tcpIn|Segs[0]"|
|00004b60| 7d 2c 22 5c 6e 22 3b 0a | 70 72 69 6e 74 20 22 4f |},"\n";.|print "O|
|00004b70| 75 74 70 75 74 20 53 65 | 67 6d 65 6e 74 73 20 20 |utput Se|gments |
|00004b80| 20 20 20 20 22 2c 24 74 | 63 70 7b 22 74 63 70 4f | ",$t|cp{"tcpO|
|00004b90| 75 74 53 65 67 73 5b 30 | 5d 22 7d 2c 22 5c 6e 22 |utSegs[0|]"},"\n"|
|00004ba0| 3b 0a 70 72 69 6e 74 20 | 22 52 65 74 72 61 6e 73 |;.print |"Retrans|
|00004bb0| 20 53 65 67 6d 65 6e 74 | 73 20 20 20 20 20 22 2c | Segment|s ",|
|00004bc0| 24 74 63 70 7b 22 74 63 | 70 52 65 74 72 61 6e 73 |$tcp{"tc|pRetrans|
|00004bd0| 53 65 67 73 5b 30 5d 22 | 7d 2c 22 5c 6e 22 3b 0a |Segs[0]"|},"\n";.|
|00004be0| 70 72 69 6e 74 20 22 49 | 6e 70 75 74 20 45 72 72 |print "I|nput Err|
|00004bf0| 6f 72 73 20 20 20 20 20 | 20 20 20 20 22 2c 24 74 |ors | ",$t|
|00004c00| 63 70 7b 22 74 63 70 49 | 6e 45 72 72 73 5b 30 5d |cp{"tcpI|nErrs[0]|
|00004c10| 22 7d 2c 22 5c 6e 22 3b | 0a 70 72 69 6e 74 20 22 |"},"\n";|.print "|
|00004c20| 4f 75 74 70 75 74 20 52 | 65 73 65 74 73 20 20 20 |Output R|esets |
|00004c30| 20 20 20 20 20 22 2c 24 | 74 63 70 7b 22 74 63 70 | ",$|tcp{"tcp|
|00004c40| 4f 75 74 52 73 74 73 5b | 30 5d 22 7d 2c 22 5c 6e |OutRsts[|0]"},"\n|
|00004c50| 22 3b 0a 0a 20 20 20 20 | 70 72 69 6e 74 20 22 5c |";.. |print "\|
|00004c60| 6e 22 3b 0a 70 72 69 6e | 74 20 22 20 22 2a 32 30 |n";.prin|t " "*20|
|00004c70| 2c 22 54 43 50 20 43 6f | 6e 6e 65 63 74 69 6f 6e |,"TCP Co|nnection|
|00004c80| 20 54 61 62 6c 65 5c 6e | 22 3b 0a 70 72 69 6e 74 | Table\n|";.print|
|00004c90| 20 22 20 22 2a 31 30 2c | 22 4c 6f 63 61 6c 20 22 | " "*10,|"Local "|
|00004ca0| 2c 22 20 22 2a 32 30 2c | 22 52 65 6d 6f 74 65 5c |," "*20,|"Remote\|
|00004cb0| 6e 22 3b 0a 20 20 20 20 | 20 20 20 20 20 70 72 69 |n";. | pri|
|00004cc0| 6e 74 66 28 22 25 2d 31 | 35 73 20 25 35 73 20 20 |ntf("%-1|5s %5s |
|00004cd0| 20 20 20 20 25 2d 31 35 | 73 20 25 35 73 20 20 20 | %-15|s %5s |
|00004ce0| 20 25 73 5c 6e 22 2c 0a | 20 20 20 20 20 20 20 20 | %s\n",.| |
|00004cf0| 20 20 20 20 20 20 20 22 | 41 64 64 72 65 73 73 22 | "|Address"|
|00004d00| 2c 22 50 6f 72 74 22 2c | 22 41 64 64 72 65 73 73 |,"Port",|"Address|
|00004d10| 22 2c 22 50 6f 72 74 22 | 2c 22 53 74 61 74 65 22 |","Port"|,"State"|
|00004d20| 29 3b 0a 20 20 66 6f 72 | 65 61 63 68 20 28 6b 65 |);. for|each (ke|
|00004d30| 79 73 20 25 74 63 70 29 | 20 7b 0a 0a 20 20 20 20 |ys %tcp)| {.. |
|00004d40| 20 20 69 66 20 28 2f 5e | 74 63 70 43 6f 6e 6e 53 | if (/^|tcpConnS|
|00004d50| 74 61 74 65 5c 5b 28 5b | 5e 5d 5d 2a 29 2f 29 20 |tate\[([|^]]*)/) |
|00004d60| 7b 0a 20 20 20 20 20 20 | 20 20 20 24 5f 20 3d 20 |{. | $_ = |
|00004d70| 24 69 6e 64 65 78 20 3d | 20 24 31 3b 0a 20 20 20 |$index =| $1;. |
|00004d80| 20 20 20 20 20 20 28 24 | 6c 69 70 2c 24 6c 70 2c | ($|lip,$lp,|
|00004d90| 24 72 69 70 2c 24 72 70 | 29 20 3d 20 0a 20 20 20 |$rip,$rp|) = . |
|00004da0| 20 20 20 20 20 20 20 20 | 20 20 20 2f 28 5c 64 2b | | /(\d+|
|00004db0| 5c 2e 5c 64 2b 5c 2e 5c | 64 2b 5c 2e 5c 64 2b 29 |\.\d+\.\|d+\.\d+)|
|00004dc0| 5c 2e 28 5c 64 2b 29 5c | 2e 28 5c 64 2b 5c 2e 5c |\.(\d+)\|.(\d+\.\|
|00004dd0| 64 2b 5c 2e 5c 64 2b 5c | 2e 5c 64 2b 29 5c 2e 28 |d+\.\d+\|.\d+)\.(|
|00004de0| 5c 64 2b 29 2f 3b 0a 20 | 20 20 20 20 20 20 20 20 |\d+)/;. | |
|00004df0| 20 20 20 20 20 24 74 63 | 70 43 6f 6e 6e 53 74 61 | $tc|pConnSta|
|00004e00| 74 65 20 3d 20 24 74 63 | 70 43 6f 6e 6e 53 74 61 |te = $tc|pConnSta|
|00004e10| 74 65 32 61 7b 24 74 63 | 70 7b 22 74 63 70 43 6f |te2a{$tc|p{"tcpCo|
|00004e20| 6e 6e 53 74 61 74 65 5b | 24 69 6e 64 65 78 5d 22 |nnState[|$index]"|
|00004e30| 7d 7d 3b 0a 20 20 20 20 | 20 20 20 20 20 70 72 69 |}};. | pri|
|00004e40| 6e 74 66 28 22 25 2d 31 | 35 73 20 25 35 64 20 20 |ntf("%-1|5s %5d |
|00004e50| 20 20 20 20 25 2d 31 35 | 73 20 25 35 64 20 20 20 | %-15|s %5d |
|00004e60| 20 25 73 5c 6e 22 2c 0a | 20 20 20 20 20 20 20 20 | %s\n",.| |
|00004e70| 20 20 20 20 20 20 20 20 | 20 20 20 20 24 6c 69 70 | | $lip|
|00004e80| 2c 24 6c 70 2c 24 72 69 | 70 2c 24 70 2c 24 74 63 |,$lp,$ri|p,$p,$tc|
|00004e90| 70 43 6f 6e 6e 53 74 61 | 74 65 29 3b 0a 20 20 20 |pConnSta|te);. |
|00004ea0| 20 20 20 7d 0a 20 20 7d | 0a 20 20 20 20 70 72 69 | }. }|. pri|
|00004eb0| 6e 74 20 22 5c 6e 22 3b | 0a 7d 0a 0a 0a 73 75 62 |nt "\n";|.}...sub|
|00004ec0| 20 64 75 6d 70 5f 75 64 | 70 20 7b 0a 0a 20 20 6c | dump_ud|p {.. l|
|00004ed0| 6f 63 61 6c 28 24 68 6f | 73 74 29 20 3d 20 40 5f |ocal($ho|st) = @_|
|00004ee0| 3b 0a 20 20 6c 6f 63 61 | 6c 28 2a 75 64 70 29 3b |;. loca|l(*udp);|
|00004ef0| 0a 0a 20 20 26 67 65 74 | 5f 74 61 62 6c 65 28 24 |.. &get|_table($|
|00004f00| 68 6f 73 74 2c 22 75 64 | 70 22 2c 2a 75 64 70 29 |host,"ud|p",*udp)|
|00004f10| 3b 0a 0a 20 20 20 20 70 | 72 69 6e 74 20 22 5c 6e |;.. p|rint "\n|
|00004f20| 22 3b 0a 20 20 20 20 70 | 72 69 6e 74 20 22 48 6f |";. p|rint "Ho|
|00004f30| 73 74 3a 20 24 68 6f 73 | 74 5c 6e 44 61 74 65 3a |st: $hos|t\nDate:|
|00004f40| 20 24 64 61 74 65 5c 6e | 22 3b 0a 20 20 20 20 70 | $date\n|";. p|
|00004f50| 72 69 6e 74 20 22 5c 6e | 22 3b 0a 20 20 20 20 70 |rint "\n|";. p|
|00004f60| 72 69 6e 74 20 22 20 20 | 20 20 20 20 20 55 44 50 |rint " | UDP|
|00004f70| 20 47 72 6f 75 70 5c 6e | 22 3b 0a 20 20 20 20 70 | Group\n|";. p|
|00004f80| 72 69 6e 74 20 22 5c 6e | 22 3b 0a 0a 20 20 20 20 |rint "\n|";.. |
|00004f90| 70 72 69 6e 74 20 22 49 | 6e 70 75 74 20 44 61 74 |print "I|nput Dat|
|00004fa0| 61 67 72 61 6d 73 20 20 | 20 22 2c 20 24 75 64 70 |agrams | ", $udp|
|00004fb0| 7b 22 75 64 70 49 6e 44 | 61 74 61 67 72 61 6d 73 |{"udpInD|atagrams|
|00004fc0| 5b 30 5d 22 7d 2b 30 2c | 22 5c 6e 22 3b 0a 20 20 |[0]"}+0,|"\n";. |
|00004fd0| 20 20 70 72 69 6e 74 20 | 22 49 6e 70 75 74 20 45 | print |"Input E|
|00004fe0| 72 72 6f 72 73 20 20 20 | 20 20 20 22 2c 20 24 75 |rrors | ", $u|
|00004ff0| 64 70 7b 22 75 64 70 49 | 6e 45 72 72 6f 72 73 5b |dp{"udpI|nErrors[|
|00005000| 30 5d 22 7d 2b 30 2c 22 | 5c 6e 22 3b 0a 20 20 20 |0]"}+0,"|\n";. |
|00005010| 20 70 72 69 6e 74 20 22 | 55 6e 6b 6e 6f 77 6e 20 | print "|Unknown |
|00005020| 44 65 73 74 20 50 6f 72 | 74 20 22 2c 20 24 75 64 |Dest Por|t ", $ud|
|00005030| 70 7b 22 75 64 70 4e 6f | 50 6f 72 74 73 5b 30 5d |p{"udpNo|Ports[0]|
|00005040| 22 7d 2b 30 2c 22 5c 6e | 22 3b 0a 20 20 20 20 70 |"}+0,"\n|";. p|
|00005050| 72 69 6e 74 20 22 4f 75 | 74 70 75 74 20 44 61 74 |rint "Ou|tput Dat|
|00005060| 61 67 72 61 6d 73 20 20 | 22 2c 20 24 75 64 70 7b |agrams |", $udp{|
|00005070| 22 75 64 70 4f 75 74 44 | 61 74 61 67 72 61 6d 73 |"udpOutD|atagrams|
|00005080| 5b 30 5d 22 7d 2b 30 2c | 22 5c 6e 22 3b 0a 0a 20 |[0]"}+0,|"\n";.. |
|00005090| 20 66 6f 72 65 61 63 68 | 20 28 6b 65 79 73 20 25 | foreach| (keys %|
|000050a0| 75 64 70 29 20 7b 0a 0a | 20 20 20 20 20 20 69 66 |udp) {..| if|
|000050b0| 20 28 2f 5e 75 64 70 4c | 6f 63 61 6c 50 6f 72 74 | (/^udpL|ocalPort|
|000050c0| 5c 5b 28 5b 5e 5d 5d 2a | 29 2f 29 20 7b 0a 69 66 |\[([^]]*|)/) {.if|
|000050d0| 20 28 21 24 64 6f 6e 65 | 29 20 7b 0a 20 20 20 20 | (!$done|) {. |
|000050e0| 70 72 69 6e 74 20 22 5c | 6e 22 3b 0a 70 72 69 6e |print "\|n";.prin|
|000050f0| 74 20 22 20 22 2a 31 30 | 2c 22 55 44 50 20 54 61 |t " "*10|,"UDP Ta|
|00005100| 62 6c 65 5c 6e 22 3b 0a | 20 20 20 20 20 20 20 20 |ble\n";.| |
|00005110| 20 70 72 69 6e 74 66 28 | 22 25 2d 31 35 73 20 25 | printf(|"%-15s %|
|00005120| 35 73 5c 6e 22 2c 22 4c | 6f 63 61 6c 20 41 64 64 |5s\n","L|ocal Add|
|00005130| 72 65 73 73 22 2c 22 4c | 6f 63 61 6c 20 50 6f 72 |ress","L|ocal Por|
|00005140| 74 22 29 3b 0a 20 24 64 | 6f 6e 65 3d 31 3b 0a 7d |t");. $d|one=1;.}|
|00005150| 0a 20 20 20 20 20 20 20 | 20 20 24 5f 20 3d 20 24 |. | $_ = $|
|00005160| 69 6e 64 65 78 20 3d 20 | 24 31 3b 0a 20 20 20 20 |index = |$1;. |
|00005170| 20 20 20 20 20 28 24 6c | 69 70 2c 24 6c 70 29 20 | ($l|ip,$lp) |
|00005180| 3d 2f 28 5c 64 2b 5c 2e | 5c 64 2b 5c 2e 5c 64 2b |=/(\d+\.|\d+\.\d+|
|00005190| 5c 2e 5c 64 2b 29 5c 2e | 28 5c 64 2b 29 2f 3b 0a |\.\d+)\.|(\d+)/;.|
|000051a0| 20 20 20 20 20 20 20 20 | 20 70 72 69 6e 74 66 28 | | printf(|
|000051b0| 22 25 2d 31 35 73 20 20 | 20 20 25 35 64 5c 6e 22 |"%-15s | %5d\n"|
|000051c0| 2c 24 6c 69 70 2c 24 6c | 70 29 3b 0a 20 20 20 20 |,$lip,$l|p);. |
|000051d0| 20 20 7d 0a 20 20 7d 0a | 20 20 20 20 70 72 69 6e | }. }.| prin|
|000051e0| 74 20 22 5c 6e 22 3b 0a | 7d 0a 0a 0a 0a 73 75 62 |t "\n";.|}....sub|
|000051f0| 20 64 75 6d 70 5f 69 63 | 6d 70 20 7b 0a 0a 20 20 | dump_ic|mp {.. |
|00005200| 6c 6f 63 61 6c 28 24 68 | 6f 73 74 29 20 3d 20 40 |local($h|ost) = @|
|00005210| 5f 3b 0a 20 20 6c 6f 63 | 61 6c 28 2a 69 63 6d 70 |_;. loc|al(*icmp|
|00005220| 29 3b 0a 0a 20 20 26 67 | 65 74 5f 74 61 62 6c 65 |);.. &g|et_table|
|00005230| 28 24 68 6f 73 74 2c 22 | 69 63 6d 70 22 2c 2a 69 |($host,"|icmp",*i|
|00005240| 63 6d 70 29 3b 0a 0a 20 | 20 20 20 70 72 69 6e 74 |cmp);.. | print|
|00005250| 20 22 5c 6e 22 3b 0a 20 | 20 20 20 70 72 69 6e 74 | "\n";. | print|
|00005260| 20 22 48 6f 73 74 3a 20 | 24 68 6f 73 74 5c 6e 44 | "Host: |$host\nD|
|00005270| 61 74 65 3a 20 24 64 61 | 74 65 5c 6e 22 3b 0a 20 |ate: $da|te\n";. |
|00005280| 20 20 20 70 72 69 6e 74 | 20 22 5c 6e 22 3b 0a 20 | print| "\n";. |
|00005290| 20 20 20 70 72 69 6e 74 | 20 22 20 22 2a 33 30 2c | print| " "*30,|
|000052a0| 22 49 43 4d 50 20 47 72 | 6f 75 70 5c 6e 22 3b 0a |"ICMP Gr|oup\n";.|
|000052b0| 0a 20 20 20 20 70 72 69 | 6e 74 20 22 5c 6e 22 3b |. pri|nt "\n";|
|000052c0| 0a 20 20 20 20 70 72 69 | 6e 74 66 28 22 20 20 20 |. pri|ntf(" |
|000052d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000052e0| 20 20 20 20 20 20 20 20 | 49 6e 70 75 74 20 20 20 | |Input |
|000052f0| 20 20 20 20 20 20 4f 75 | 74 70 75 74 5c 6e 22 29 | Ou|tput\n")|
|00005300| 3b 0a 20 20 20 20 70 72 | 69 6e 74 66 28 22 20 4d |;. pr|intf(" M|
|00005310| 65 73 73 61 67 65 73 20 | 20 20 20 20 20 20 20 20 |essages | |
|00005320| 20 20 25 31 32 64 20 20 | 20 25 31 32 64 5c 6e 22 | %12d | %12d\n"|
|00005330| 2c 20 24 69 63 6d 70 7b | 22 69 63 6d 70 49 6e 4d |, $icmp{|"icmpInM|
|00005340| 73 67 73 5b 30 5d 22 7d | 2c 20 24 69 63 6d 70 7b |sgs[0]"}|, $icmp{|
|00005350| 22 69 63 6d 70 4f 75 74 | 4d 73 67 73 5b 30 5d 22 |"icmpOut|Msgs[0]"|
|00005360| 7d 29 3b 0a 20 20 20 20 | 70 72 69 6e 74 66 28 22 |});. |printf("|
|00005370| 20 45 72 72 6f 72 73 20 | 20 20 20 20 20 20 20 20 | Errors | |
|00005380| 20 20 20 20 25 31 32 64 | 20 20 20 25 31 32 64 5c | %12d| %12d\|
|00005390| 6e 22 2c 20 24 69 63 6d | 70 7b 22 69 63 6d 70 49 |n", $icm|p{"icmpI|
|000053a0| 6e 45 72 72 6f 72 73 5b | 30 5d 22 7d 2c 20 24 69 |nErrors[|0]"}, $i|
|000053b0| 63 6d 70 7b 22 69 63 6d | 70 4f 75 74 45 72 72 6f |cmp{"icm|pOutErro|
|000053c0| 72 73 5b 30 5d 22 7d 29 | 3b 0a 20 20 20 20 70 72 |rs[0]"})|;. pr|
|000053d0| 69 6e 74 66 28 22 20 44 | 65 73 74 20 75 6e 72 65 |intf(" D|est unre|
|000053e0| 61 63 68 20 20 20 20 20 | 20 20 25 31 32 64 20 20 |ach | %12d |
|000053f0| 20 25 31 32 64 5c 6e 22 | 2c 20 24 69 63 6d 70 7b | %12d\n"|, $icmp{|
|00005400| 22 69 63 6d 70 49 6e 44 | 65 73 74 55 6e 72 65 61 |"icmpInD|estUnrea|
|00005410| 63 68 73 5b 30 5d 22 7d | 2c 20 24 69 63 6d 70 7b |chs[0]"}|, $icmp{|
|00005420| 22 69 63 6d 70 4f 75 74 | 44 65 73 74 55 6e 72 65 |"icmpOut|DestUnre|
|00005430| 61 63 68 73 5b 30 5d 22 | 7d 29 3b 0a 20 20 20 20 |achs[0]"|});. |
|00005440| 70 72 69 6e 74 66 28 22 | 20 54 69 6d 65 20 65 78 |printf("| Time ex|
|00005450| 63 65 65 64 73 20 20 20 | 20 20 20 20 25 31 32 64 |ceeds | %12d|
|00005460| 20 20 20 25 31 32 64 5c | 6e 22 2c 20 24 69 63 6d | %12d\|n", $icm|
|00005470| 70 7b 22 69 63 6d 70 49 | 6e 54 69 6d 65 45 78 63 |p{"icmpI|nTimeExc|
|00005480| 64 73 5b 30 5d 22 7d 2c | 20 24 69 63 6d 70 7b 22 |ds[0]"},| $icmp{"|
|00005490| 69 63 6d 70 49 6e 54 4f | 75 74 65 45 78 63 64 73 |icmpInTO|uteExcds|
|000054a0| 5b 30 5d 22 7d 29 3b 0a | 20 20 20 20 70 72 69 6e |[0]"});.| prin|
|000054b0| 74 66 28 22 20 50 61 72 | 6d 20 70 72 6f 62 6c 65 |tf(" Par|m proble|
|000054c0| 6d 73 20 20 20 20 20 20 | 25 31 32 64 20 20 20 25 |ms |%12d %|
|000054d0| 31 32 64 5c 6e 22 2c 20 | 24 69 63 6d 70 7b 22 69 |12d\n", |$icmp{"i|
|000054e0| 63 6d 70 49 6e 50 61 72 | 6d 50 72 6f 62 73 5b 30 |cmpInPar|mProbs[0|
|000054f0| 5d 22 7d 2c 20 24 69 63 | 6d 70 7b 22 69 63 6d 70 |]"}, $ic|mp{"icmp|
|00005500| 4f 75 74 50 61 72 6d 50 | 72 6f 62 73 5b 30 5d 22 |OutParmP|robs[0]"|
|00005510| 7d 29 3b 0a 20 20 20 20 | 70 72 69 6e 74 66 28 22 |});. |printf("|
|00005520| 20 53 6f 75 72 63 65 20 | 51 75 65 6e 63 68 73 20 | Source |Quenchs |
|00005530| 20 20 20 20 25 31 32 64 | 20 20 20 25 31 32 64 5c | %12d| %12d\|
|00005540| 6e 22 2c 20 24 69 63 6d | 70 7b 22 69 63 6d 70 49 |n", $icm|p{"icmpI|
|00005550| 6e 53 72 63 51 75 65 6e | 63 68 73 5b 30 5d 22 7d |nSrcQuen|chs[0]"}|
|00005560| 2c 20 24 69 63 6d 70 7b | 22 69 63 6d 70 4f 75 74 |, $icmp{|"icmpOut|
|00005570| 53 72 63 51 75 65 6e 63 | 68 73 5b 30 5d 22 7d 29 |SrcQuenc|hs[0]"})|
|00005580| 3b 0a 20 20 20 20 70 72 | 69 6e 74 66 28 22 20 52 |;. pr|intf(" R|
|00005590| 65 64 69 72 65 63 74 73 | 20 20 20 20 20 20 20 20 |edirects| |
|000055a0| 20 20 25 31 32 64 20 20 | 20 25 31 32 64 5c 6e 22 | %12d | %12d\n"|
|000055b0| 2c 20 24 69 63 6d 70 7b | 22 69 63 6d 70 49 6e 52 |, $icmp{|"icmpInR|
|000055c0| 65 64 69 72 65 63 74 73 | 5b 30 5d 22 7d 2c 20 24 |edirects|[0]"}, $|
|000055d0| 69 63 6d 70 7b 22 69 63 | 6d 70 49 6e 52 65 64 4f |icmp{"ic|mpInRedO|
|000055e0| 75 74 65 63 74 73 5b 30 | 5d 22 7d 29 3b 0a 20 20 |utects[0|]"});. |
|000055f0| 20 20 70 72 69 6e 74 66 | 28 22 20 45 63 68 6f 73 | printf|(" Echos|
|00005600| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 25 31 | | %1|
|00005610| 32 64 20 20 20 25 31 32 | 64 5c 6e 22 2c 20 24 69 |2d %12|d\n", $i|
|00005620| 63 6d 70 7b 22 69 63 6d | 70 49 6e 45 63 68 6f 73 |cmp{"icm|pInEchos|
|00005630| 5b 30 5d 22 7d 2c 20 24 | 69 63 6d 70 7b 22 69 63 |[0]"}, $|icmp{"ic|
|00005640| 6d 70 4f 75 74 45 63 68 | 6f 73 5b 30 5d 22 7d 29 |mpOutEch|os[0]"})|
|00005650| 3b 0a 20 20 20 20 70 72 | 69 6e 74 66 28 22 20 45 |;. pr|intf(" E|
|00005660| 63 68 6f 20 72 65 70 73 | 20 20 20 20 20 20 20 20 |cho reps| |
|00005670| 20 20 25 31 32 64 20 20 | 20 25 31 32 64 5c 6e 22 | %12d | %12d\n"|
|00005680| 2c 20 24 69 63 6d 70 7b | 22 69 63 6d 70 49 6e 45 |, $icmp{|"icmpInE|
|00005690| 63 68 6f 52 65 70 73 5b | 30 5d 22 7d 2c 20 24 69 |choReps[|0]"}, $i|
|000056a0| 63 6d 70 7b 22 69 63 6d | 70 4f 75 74 45 63 68 6f |cmp{"icm|pOutEcho|
|000056b0| 52 65 70 73 5b 30 5d 22 | 7d 29 3b 0a 20 20 20 20 |Reps[0]"|});. |
|000056c0| 70 72 69 6e 74 66 28 22 | 20 54 69 6d 65 73 74 61 |printf("| Timesta|
|000056d0| 6d 70 73 20 20 20 20 20 | 20 20 20 20 25 31 32 64 |mps | %12d|
|000056e0| 20 20 20 25 31 32 64 5c | 6e 22 2c 20 24 69 63 6d | %12d\|n", $icm|
|000056f0| 70 7b 22 69 63 6d 70 49 | 6e 54 69 6d 65 73 74 61 |p{"icmpI|nTimesta|
|00005700| 6d 70 73 5b 30 5d 22 7d | 2c 20 24 69 63 6d 70 7b |mps[0]"}|, $icmp{|
|00005710| 22 69 63 6d 70 49 6e 54 | 4f 75 74 65 73 74 61 6d |"icmpInT|Outestam|
|00005720| 70 73 5b 30 5d 22 7d 29 | 3b 0a 20 20 20 20 70 72 |ps[0]"})|;. pr|
|00005730| 69 6e 74 66 28 22 20 54 | 69 6d 65 73 74 61 6d 70 |intf(" T|imestamp|
|00005740| 20 72 65 70 73 20 20 20 | 20 20 25 31 32 64 20 20 | reps | %12d |
|00005750| 20 25 31 32 64 5c 6e 22 | 2c 20 24 69 63 6d 70 7b | %12d\n"|, $icmp{|
|00005760| 22 69 63 6d 70 49 6e 54 | 69 6d 65 73 74 61 6d 70 |"icmpInT|imestamp|
|00005770| 52 65 70 73 5b 30 5d 22 | 7d 2c 20 24 69 63 6d 70 |Reps[0]"|}, $icmp|
|00005780| 7b 22 69 63 6d 70 49 6e | 54 4f 75 74 65 73 74 61 |{"icmpIn|TOutesta|
|00005790| 6d 70 52 65 70 73 5b 30 | 5d 22 7d 29 3b 0a 20 20 |mpReps[0|]"});. |
|000057a0| 20 20 70 72 69 6e 74 66 | 28 22 20 41 64 64 72 65 | printf|(" Addre|
|000057b0| 73 73 20 6d 61 73 6b 73 | 20 20 20 20 20 20 25 31 |ss masks| %1|
|000057c0| 32 64 20 20 20 25 31 32 | 64 5c 6e 22 2c 20 24 69 |2d %12|d\n", $i|
|000057d0| 63 6d 70 7b 22 69 63 6d | 70 49 6e 41 64 64 72 4d |cmp{"icm|pInAddrM|
|000057e0| 61 73 6b 73 5b 30 5d 22 | 7d 2c 20 24 69 63 6d 70 |asks[0]"|}, $icmp|
|000057f0| 7b 22 69 63 6d 70 4f 75 | 74 41 64 64 72 4d 61 73 |{"icmpOu|tAddrMas|
|00005800| 6b 73 5b 30 5d 22 7d 29 | 3b 0a 20 20 20 20 70 72 |ks[0]"})|;. pr|
|00005810| 69 6e 74 66 28 22 20 41 | 64 64 72 65 73 73 20 6d |intf(" A|ddress m|
|00005820| 61 73 6b 20 72 65 70 73 | 20 20 25 31 32 64 20 20 |ask reps| %12d |
|00005830| 20 25 31 32 64 5c 6e 22 | 2c 20 24 69 63 6d 70 7b | %12d\n"|, $icmp{|
|00005840| 22 69 63 6d 70 49 6e 41 | 64 64 72 4d 61 73 6b 52 |"icmpInA|ddrMaskR|
|00005850| 65 70 73 5b 30 5d 22 7d | 2c 20 24 69 63 6d 70 7b |eps[0]"}|, $icmp{|
|00005860| 22 69 63 6d 70 4f 75 74 | 41 64 64 72 4d 61 73 6b |"icmpOut|AddrMask|
|00005870| 52 65 70 73 5b 30 5d 22 | 7d 29 3b 0a 0a 0a 0a 20 |Reps[0]"|});.... |
|00005880| 20 20 20 70 72 69 6e 74 | 20 22 5c 6e 22 3b 0a 7d | print| "\n";.}|
|00005890| 0a 0a 0a 73 75 62 20 67 | 65 74 5f 74 61 62 6c 65 |...sub g|et_table|
|000058a0| 20 7b 20 0a 20 20 20 20 | 6c 6f 63 61 6c 28 24 68 | { . |local($h|
|000058b0| 6f 73 74 2c 24 74 2c 2a | 74 61 62 6c 65 29 20 3d |ost,$t,*|table) =|
|000058c0| 20 40 5f 3b 0a 0a 20 6f | 70 65 6e 28 53 4e 4d 50 | @_;.. o|pen(SNMP|
|000058d0| 2c 22 65 63 68 6f 20 27 | 24 74 5c 5b 5d 27 20 7c |,"echo '|$t\[]' ||
|000058e0| 20 24 73 6e 6d 70 5f 74 | 61 62 6c 65 20 24 68 6f | $snmp_t|able $ho|
|000058f0| 73 74 7c 22 29 3b 0a 20 | 77 68 69 6c 65 28 3c 53 |st|");. |while(<S|
|00005900| 4e 4d 50 3e 29 20 7b 0a | 20 20 20 20 63 68 6f 70 |NMP>) {.| chop|
|00005910| 3b 0a 20 20 20 20 2f 5e | 28 2e 2a 29 3d 28 2e 2a |;. /^|(.*)=(.*|
|00005920| 29 24 2f 3b 0a 20 20 20 | 20 24 74 61 62 6c 65 7b |)$/;. | $table{|
|00005930| 24 31 7d 20 3d 20 24 32 | 3b 0a 20 7d 0a 7d 0a 0a |$1} = $2|;. }.}..|
|00005940| 0a 31 3b 0a 74 50 6b 74 | 73 29 3b 0a 70 72 69 6e |.1;.tPkt|s);.prin|
|00005950| 74 66 28 22 20 20 62 72 | 6f 61 64 2f 6d 75 6c 74 |tf(" br|oad/mult|
|00005960| 69 20 20 20 25 64 5c 6e | 22 2c 24 69 66 4f 75 74 |i %d\n|",$ifOut|
|00005970| 4e 55 63 61 73 74 50 6b | 74 73 29 3b 0a 70 72 69 |NUcastPk|ts);.pri|
|00005980| 6e 74 66 28 22 20 20 64 | 69 73 63 61 72 64 73 20 |ntf(" d|iscards |
|00005990| 20 20 20 20 20 25 64 5c | 6e 22 2c 24 69 66 4f 75 | %d\|n",$ifOu|
|000059a0| 74 44 69 73 63 61 72 64 | 73 29 3b 0a 70 72 69 6e |tDiscard|s);.prin|
|000059b0| 74 66 28 22 20 20 65 72 | 72 6f 72 73 20 20 20 20 |tf(" er|rors |
|000059c0| 20 20 20 20 25 64 5c 6e | 22 2c 24 69 66 4f 75 74 | %d\n|",$ifOut|
|000059d0| 45 72 72 6f 72 73 29 3b | 0a 0a 0a 20 20 7d 0a 7d |Errors);|... }.}|
|000059e0| 0a 0a 73 75 62 20 64 75 | 6d 70 5f 61 74 20 7b 0a |..sub du|mp_at {.|
|000059f0| 0a 20 20 6c 6f 63 61 6c | 28 24 68 6f 73 74 29 20 |. local|($host) |
|00005a00| 67 6f 34 67 77 2f 61 72 | 65 61 63 6f 64 65 00 00 |go4gw/ar|eacode..|
|00005a10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a60| 00 00 00 00 20 20 20 37 | 37 35 20 00 20 20 32 31 |.... 7|75 . 21|
|00005a70| 37 33 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |73 . | 0 . |
|00005a80| 20 20 31 37 34 30 36 20 | 20 35 32 35 36 33 36 31 | 17406 | 5256361|
|00005a90| 36 37 32 20 20 20 36 36 | 37 30 00 20 00 00 00 00 |672 66|70. ....|
|00005aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005c00| 23 21 2f 62 69 6e 2f 73 | 68 0a 24 49 46 53 20 3b |#!/bin/s|h.$IFS ;|
|00005c10| 20 20 74 65 73 74 20 2d | 66 20 2f 75 73 72 2f 62 | test -|f /usr/b|
|00005c20| 69 6e 2f 6c 6f 6f 6b 20 | 26 26 20 4c 4f 4f 4b 3d |in/look |&& LOOK=|
|00005c30| 2f 75 73 72 2f 62 69 6e | 2f 6c 6f 6f 6b 20 7c 7c |/usr/bin|/look |||
|00005c40| 20 4c 4f 4f 4b 3d 27 67 | 72 65 70 20 2d 69 27 0a | LOOK='g|rep -i'.|
|00005c50| 24 49 46 53 20 3b 20 66 | 6f 72 20 69 20 69 6e 20 |$IFS ; f|or i in |
|00005c60| 22 24 7b 40 2d 6e 75 6d | 62 65 72 5c 5d 7d 22 3b |"${@-num|ber\]}";|
|00005c70| 20 64 6f 20 63 61 73 65 | 20 22 24 69 22 20 69 6e | do case| "$i" in|
|00005c80| 20 5b 30 2d 39 5d 5b 30 | 31 5d 5b 30 2d 39 5d 29 | [0-9][0|1][0-9])|
|00005c90| 20 24 4c 4f 4f 4b 20 24 | 69 20 24 30 0a 24 49 46 | $LOOK $|i $0.$IF|
|00005ca0| 53 3b 3b 20 2a 29 20 73 | 65 64 20 31 2c 34 64 20 |S;; *) s|ed 1,4d |
|00005cb0| 22 24 30 22 20 7c 20 67 | 72 65 70 20 2d 69 20 22 |"$0" | g|rep -i "|
|00005cc0| 24 69 22 3b 3b 20 65 73 | 61 63 3b 20 64 6f 6e 65 |$i";; es|ac; done|
|00005cd0| 3b 20 65 78 69 74 0a 30 | 31 31 20 5b 20 49 6e 74 |; exit.0|11 [ Int|
|00005ce0| 65 72 6e 61 74 69 6f 6e | 61 6c 20 41 63 63 65 73 |ernation|al Acces|
|00005cf0| 73 20 43 6f 64 65 20 5d | 0a 32 30 30 20 5b 20 52 |s Code ]|.200 [ R|
|00005d00| 65 73 65 72 76 65 64 20 | 2d 20 53 65 72 76 69 63 |eserved |- Servic|
|00005d10| 65 20 41 63 63 65 73 73 | 20 43 6f 64 65 20 5d 0a |e Access| Code ].|
|00005d20| 32 30 31 20 4d 6f 72 72 | 69 73 74 6f 77 6e 2c 20 |201 Morr|istown, |
|00005d30| 4e 65 77 61 72 6b 20 61 | 6e 64 20 4a 65 72 73 65 |Newark a|nd Jerse|
|00005d40| 79 20 43 69 74 79 2c 20 | 28 4e 6f 72 74 68 65 61 |y City, |(Northea|
|00005d50| 73 74 29 20 4e 65 77 20 | 4a 65 72 73 65 79 0a 32 |st) New |Jersey.2|
|00005d60| 30 32 20 57 61 73 68 69 | 6e 67 74 6f 6e 2c 20 44 |02 Washi|ngton, D|
|00005d70| 69 73 74 72 69 63 74 20 | 6f 66 20 43 6f 6c 75 6d |istrict |of Colum|
|00005d80| 62 69 61 0a 32 30 33 20 | 41 6c 6c 20 70 61 72 74 |bia.203 |All part|
|00005d90| 73 20 6f 66 20 43 6f 6e | 6e 65 63 74 69 63 75 74 |s of Con|necticut|
|00005da0| 0a 32 30 34 20 41 6c 6c | 20 70 61 72 74 73 20 6f |.204 All| parts o|
|00005db0| 66 20 4d 61 6e 69 74 6f | 62 61 2c 20 43 41 4e 41 |f Manito|ba, CANA|
|00005dc0| 44 41 0a 32 30 35 20 41 | 6c 6c 20 70 61 72 74 73 |DA.205 A|ll parts|
|00005dd0| 20 6f 66 20 41 6c 61 62 | 61 6d 61 0a 32 30 36 20 | of Alab|ama.206 |
|00005de0| 53 65 61 74 74 6c 65 2c | 20 54 61 63 6f 6d 61 20 |Seattle,| Tacoma |
|00005df0| 61 6e 64 20 56 61 6e 63 | 6f 75 76 65 72 2c 20 28 |and Vanc|ouver, (|
|00005e00| 57 65 73 74 65 72 6e 29 | 20 57 61 73 68 69 6e 67 |Western)| Washing|
|00005e10| 74 6f 6e 0a 32 30 37 20 | 41 6c 6c 20 70 61 72 74 |ton.207 |All part|
|00005e20| 73 20 6f 66 20 4d 61 69 | 6e 65 0a 32 30 38 20 41 |s of Mai|ne.208 A|
|00005e30| 6c 6c 20 70 61 72 74 73 | 20 6f 66 20 49 64 61 68 |ll parts| of Idah|
|00005e40| 6f 0a 32 30 39 20 46 72 | 65 73 6e 6f 20 61 6e 64 |o.209 Fr|esno and|
|00005e50| 20 53 74 6f 63 6b 74 6f | 6e 2c 20 28 43 65 6e 74 | Stockto|n, (Cent|
|00005e60| 72 61 6c 29 20 43 61 6c | 69 66 6f 72 6e 69 61 0a |ral) Cal|ifornia.|
|00005e70| 32 31 30 20 53 61 6e 20 | 41 6e 74 6f 6e 69 6f 2c |210 San |Antonio,|
|00005e80| 20 28 53 6f 75 74 68 65 | 72 6e 29 20 54 65 78 61 | (Southe|rn) Texa|
|00005e90| 73 20 5b 35 31 32 20 75 | 6e 74 69 6c 20 31 20 4e |s [512 u|ntil 1 N|
|00005ea0| 6f 76 20 31 39 39 32 5d | 0a 32 31 31 20 5b 20 43 |ov 1992]|.211 [ C|
|00005eb0| 6f 69 6e 2d 6f 70 65 72 | 61 74 65 64 20 54 65 6c |oin-oper|ated Tel|
|00005ec0| 65 70 68 6f 6e 65 20 52 | 65 66 75 6e 64 73 20 5d |ephone R|efunds ]|
|00005ed0| 0a 32 31 32 20 4e 65 77 | 20 59 6f 72 6b 20 43 69 |.212 New| York Ci|
|00005ee0| 74 79 20 28 4d 61 6e 68 | 61 74 74 61 6e 20 6f 6e |ty (Manh|attan on|
|00005ef0| 6c 79 29 2c 20 4e 65 77 | 20 59 6f 72 6b 0a 32 31 |ly), New| York.21|
|00005f00| 33 20 4c 6f 73 20 41 6e | 67 65 6c 65 73 2c 20 43 |3 Los An|geles, C|
|00005f10| 61 6c 69 66 6f 72 6e 69 | 61 0a 32 31 34 20 44 61 |aliforni|a.214 Da|
|00005f20| 6c 6c 61 73 2c 20 28 4e | 6f 72 74 68 65 61 73 74 |llas, (N|ortheast|
|00005f30| 29 20 54 65 78 61 73 0a | 32 31 35 20 41 6c 6c 65 |) Texas.|215 Alle|
|00005f40| 6e 74 6f 77 6e 2c 20 43 | 68 65 73 74 65 72 20 61 |ntown, C|hester a|
|00005f50| 6e 64 20 50 68 69 6c 61 | 64 65 6c 70 68 69 61 2c |nd Phila|delphia,|
|00005f60| 20 28 53 6f 75 74 68 65 | 61 73 74 29 20 50 65 6e | (Southe|ast) Pen|
|00005f70| 6e 73 79 6c 76 61 6e 69 | 61 0a 32 31 36 20 41 6b |nsylvani|a.216 Ak|
|00005f80| 72 6f 6e 2c 20 43 6c 65 | 76 65 6c 61 6e 64 2c 20 |ron, Cle|veland, |
|00005f90| 4d 61 73 73 69 6c 6c 6f | 6e 20 61 6e 64 20 59 6f |Massillo|n and Yo|
|00005fa0| 75 6e 67 73 74 6f 77 6e | 2c 20 28 4e 6f 72 74 68 |ungstown|, (North|
|00005fb0| 65 61 73 74 29 20 4f 68 | 69 6f 0a 32 31 37 20 53 |east) Oh|io.217 S|
|00005fc0| 70 72 69 6e 67 66 69 65 | 6c 64 20 61 6e 64 20 43 |pringfie|ld and C|
|00005fd0| 68 61 6d 70 61 69 67 6e | 2d 55 72 62 61 6e 61 2c |hampaign|-Urbana,|
|00005fe0| 20 28 53 6f 75 74 68 20 | 43 65 6e 74 72 61 6c 29 | (South |Central)|
|00005ff0| 20 49 6c 6c 69 6e 6f 69 | 73 0a 32 31 38 20 44 75 | Illinoi|s.218 Du|
|00006000| 6c 75 74 68 2c 20 28 4e | 6f 72 74 68 65 72 6e 29 |luth, (N|orthern)|
|00006010| 20 4d 69 6e 6e 65 73 6f | 74 61 0a 32 31 39 20 47 | Minneso|ta.219 G|
|00006020| 61 72 79 2c 20 48 61 6d | 6d 6f 6e 64 2c 20 46 6f |ary, Ham|mond, Fo|
|00006030| 72 74 20 57 61 79 6e 65 | 20 61 6e 64 20 53 6f 75 |rt Wayne| and Sou|
|00006040| 74 68 20 42 65 6e 64 2c | 20 28 4e 6f 72 74 68 65 |th Bend,| (Northe|
|00006050| 72 6e 29 20 49 6e 64 69 | 61 6e 61 0a 33 30 30 20 |rn) Indi|ana.300 |
|00006060| 5b 20 52 65 73 65 72 76 | 65 64 20 2d 20 53 65 72 |[ Reserv|ed - Ser|
|00006070| 76 69 63 65 20 41 63 63 | 65 73 73 20 43 6f 64 65 |vice Acc|ess Code|
|00006080| 20 5d 0a 33 30 31 20 53 | 69 6c 76 65 72 20 53 70 | ].301 S|ilver Sp|
|00006090| 72 69 6e 67 20 61 6e 64 | 20 46 72 65 64 65 72 69 |ring and| Frederi|
|000060a0| 63 6b 2c 20 28 53 6f 75 | 74 68 65 72 6e 20 61 6e |ck, (Sou|thern an|
|000060b0| 64 20 57 65 73 74 65 72 | 6e 29 20 4d 61 72 79 6c |d Wester|n) Maryl|
|000060c0| 61 6e 64 0a 33 30 32 20 | 41 6c 6c 20 70 61 72 74 |and.302 |All part|
|000060d0| 73 20 6f 66 20 44 65 6c | 61 77 61 72 65 0a 33 30 |s of Del|aware.30|
|000060e0| 33 20 42 6f 75 6c 64 65 | 72 2c 20 44 65 6e 76 65 |3 Boulde|r, Denve|
|000060f0| 72 20 61 6e 64 20 47 72 | 61 6e 64 20 4a 75 6e 63 |r and Gr|and Junc|
|00006100| 74 69 6f 6e 2c 20 28 4e | 6f 72 74 68 65 72 6e 20 |tion, (N|orthern |
|00006110| 61 6e 64 20 57 65 73 74 | 65 72 6e 29 20 43 6f 6c |and West|ern) Col|
|00006120| 6f 72 61 64 6f 0a 33 30 | 34 20 41 6c 6c 20 70 61 |orado.30|4 All pa|
|00006130| 72 74 73 20 6f 66 20 57 | 65 73 74 20 56 69 72 67 |rts of W|est Virg|
|00006140| 69 6e 69 61 0a 33 30 35 | 20 46 6f 72 74 20 4c 61 |inia.305| Fort La|
|00006150| 75 64 65 72 64 61 6c 65 | 2c 20 4b 65 79 20 57 65 |uderdale|, Key We|
|00006160| 73 74 20 61 6e 64 20 4d | 69 61 6d 69 2c 20 28 53 |st and M|iami, (S|
|00006170| 6f 75 74 68 65 61 73 74 | 29 20 46 6c 6f 72 69 64 |outheast|) Florid|
|00006180| 61 0a 33 30 36 20 41 6c | 6c 20 70 61 72 74 73 20 |a.306 Al|l parts |
|00006190| 6f 66 20 53 61 73 6b 61 | 74 63 68 65 77 61 6e 2c |of Saska|tchewan,|
|000061a0| 20 43 41 4e 41 44 41 0a | 33 30 37 20 41 6c 6c 20 | CANADA.|307 All |
|000061b0| 70 61 72 74 73 20 6f 66 | 20 57 79 6f 6d 69 6e 67 |parts of| Wyoming|
|000061c0| 0a 33 30 38 20 4e 6f 72 | 74 68 20 50 6c 61 74 74 |.308 Nor|th Platt|
|000061d0| 65 20 61 6e 64 20 47 72 | 61 6e 64 20 49 73 6c 61 |e and Gr|and Isla|
|000061e0| 6e 64 2c 20 28 57 65 73 | 74 65 72 6e 29 20 4e 65 |nd, (Wes|tern) Ne|
|000061f0| 62 72 61 73 6b 61 0a 33 | 30 39 20 4d 6f 6c 69 6e |braska.3|09 Molin|
|00006200| 65 2c 20 52 6f 63 6b 20 | 49 73 6c 61 6e 64 20 61 |e, Rock |Island a|
|00006210| 6e 64 20 50 65 6f 72 69 | 61 2c 20 28 57 65 73 74 |nd Peori|a, (West|
|00006220| 20 43 65 6e 74 72 61 6c | 29 20 49 6c 6c 69 6e 6f | Central|) Illino|
|00006230| 69 73 0a 33 31 30 20 50 | 61 72 74 73 20 6f 66 20 |is.310 P|arts of |
|00006240| 4c 6f 73 20 41 6e 67 65 | 6c 65 73 2c 20 43 61 6c |Los Ange|les, Cal|
|00006250| 69 66 6f 72 6e 69 61 0a | 33 31 31 20 5b 20 52 65 |ifornia.|311 [ Re|
|00006260| 73 65 72 76 65 64 20 2d | 20 53 70 65 63 69 61 6c |served -| Special|
|00006270| 20 46 75 6e 63 74 69 6f | 6e 20 5d 0a 33 31 32 20 | Functio|n ].312 |
|00006280| 43 68 69 63 61 67 6f 2c | 20 49 6c 6c 69 6e 6f 69 |Chicago,| Illinoi|
|00006290| 73 0a 33 31 33 20 44 65 | 74 72 6f 69 74 20 61 6e |s.313 De|troit an|
|000062a0| 64 20 41 6e 6e 20 41 72 | 62 6f 72 2c 20 28 45 61 |d Ann Ar|bor, (Ea|
|000062b0| 73 74 65 72 6e 29 20 4d | 69 63 68 69 67 61 6e 0a |stern) M|ichigan.|
|000062c0| 33 31 34 20 53 61 69 6e | 74 20 4c 6f 75 69 73 20 |314 Sain|t Louis |
|000062d0| 61 6e 64 20 43 6f 6c 75 | 6d 62 69 61 2c 20 28 45 |and Colu|mbia, (E|
|000062e0| 61 73 74 65 72 6e 29 20 | 4d 69 73 73 6f 75 72 69 |astern) |Missouri|
|000062f0| 0a 33 31 35 20 4f 73 77 | 65 67 6f 2c 20 53 79 72 |.315 Osw|ego, Syr|
|00006300| 61 63 75 73 65 20 61 6e | 64 20 55 74 69 63 61 2c |acuse an|d Utica,|
|00006310| 20 28 4e 6f 72 74 68 20 | 43 65 6e 74 72 61 6c 29 | (North |Central)|
|00006320| 20 4e 65 77 20 59 6f 72 | 6b 0a 33 31 36 20 44 6f | New Yor|k.316 Do|
|00006330| 64 67 65 20 43 69 74 79 | 20 61 6e 64 20 57 69 63 |dge City| and Wic|
|00006340| 68 69 74 61 2c 20 28 53 | 6f 75 74 68 65 72 6e 29 |hita, (S|outhern)|
|00006350| 20 4b 61 6e 73 61 73 0a | 33 31 37 20 49 6e 64 69 | Kansas.|317 Indi|
|00006360| 61 6e 61 70 6f 6c 69 73 | 20 61 6e 64 20 4b 6f 6b |anapolis| and Kok|
|00006370| 6f 6d 6f 2c 20 28 43 65 | 6e 74 72 61 6c 29 20 49 |omo, (Ce|ntral) I|
|00006380| 6e 64 69 61 6e 61 0a 33 | 31 38 20 4c 61 6b 65 20 |ndiana.3|18 Lake |
|00006390| 43 68 61 72 6c 65 73 20 | 61 6e 64 20 53 68 72 65 |Charles |and Shre|
|000063a0| 76 65 70 6f 72 74 2c 20 | 28 57 65 73 74 65 72 6e |veport, |(Western|
|000063b0| 29 20 4c 6f 75 69 73 69 | 61 6e 61 0a 33 31 39 20 |) Louisi|ana.319 |
|000063c0| 44 75 62 75 71 75 65 2c | 20 43 65 64 61 72 20 52 |Dubuque,| Cedar R|
|000063d0| 61 70 69 64 73 20 61 6e | 64 20 49 6f 77 61 20 43 |apids an|d Iowa C|
|000063e0| 69 74 79 2c 20 28 45 61 | 73 74 65 72 6e 29 20 49 |ity, (Ea|stern) I|
|000063f0| 6f 77 61 0a 34 30 30 20 | 5b 20 52 65 73 65 72 76 |owa.400 |[ Reserv|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.